From 377d42d0cea0fa4602ee8216a7b933f71651c4f4 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 24 Mar 2021 17:36:40 +0100 Subject: [PATCH] Update nginx.conf --- conf/nginx.conf | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index d2d2727..dea1bdb 100755 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,4 +1,24 @@ -location ^~ / { +location ~ /ws/* { + proxy_pass http://127.0.0.1:__PORT__/; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + client_max_body_size 50M; + proxy_set_header Host $http_host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Frame-Options SAMEORIGIN; + proxy_buffers 256 16k; + proxy_buffer_size 16k; + client_body_timeout 60; + send_timeout 300; + lingering_timeout 5; + proxy_connect_timeout 1d; + proxy_send_timeout 1d; + proxy_read_timeout 1d; +} + +location / { # Force usage of https if ($scheme = http) { @@ -27,22 +47,3 @@ location ^~ / { more_clear_input_headers 'Accept-Encoding'; } -location /ws/ { - proxy_pass http://127.0.0.1:__PORT__/; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - client_max_body_size 50M; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header X-Frame-Options SAMEORIGIN; - proxy_buffers 256 16k; - proxy_buffer_size 16k; - client_body_timeout 60; - send_timeout 300; - lingering_timeout 5; - proxy_connect_timeout 1d; - proxy_send_timeout 1d; - proxy_read_timeout 1d; -}