From c9600c12ab1c4d332fd0f56d5ba462337e9f4521 Mon Sep 17 00:00:00 2001 From: mathilde-cryptpad <156299270+mathilde-cryptpad@users.noreply.github.com> Date: Fri, 17 May 2024 10:34:51 +0200 Subject: [PATCH] add a location block dedicated to the websocket to improve performances --- docs/example.nginx.conf | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/example.nginx.conf b/docs/example.nginx.conf index 8bd4fc3a1..89c3cbeff 100644 --- a/docs/example.nginx.conf +++ b/docs/example.nginx.conf @@ -70,4 +70,15 @@ server { proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection upgrade; } + + location ^~ /cryptpad_websocket { + proxy_pass http://localhost:3003; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header Host $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection upgrade; + } }