From 4750d5d14f562cbfbc34f301d429107058f74f28 Mon Sep 17 00:00:00 2001 From: Stepan Vladovskiy Date: Wed, 18 Oct 2023 19:52:22 -0300 Subject: [PATCH 1/3] feat: sigil handle all --- nginx.conf.sigil | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/nginx.conf.sigil b/nginx.conf.sigil index a812601..9f7976f 100644 --- a/nginx.conf.sigil +++ b/nginx.conf.sigil @@ -48,8 +48,15 @@ server { location / { proxy_pass http://{{ $.APP }}-{{ $upstream_port }}; + add_header 'Cache-Control' 'no-cache'; + add_header 'Content-Type' 'text/event-stream'; + add_header 'Connection' 'keep-alive'; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + proxy_buffering off; + proxy_cache off; + proxy_read_timeout 36000s; {{ $proxy_settings }} - {{ $gzip_settings }} {{ $cors_headers_options }} {{ $cors_headers_post }} {{ $cors_headers_get }} From 58c85b5082b45be8d319b55d26e9e00d0746868e Mon Sep 17 00:00:00 2001 From: Stepan Vladovskiy Date: Wed, 18 Oct 2023 20:16:42 -0300 Subject: [PATCH 2/3] feat: sigil simple 1 --- nginx.conf.sigil | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/nginx.conf.sigil b/nginx.conf.sigil index 9f7976f..ae771ef 100644 --- a/nginx.conf.sigil +++ b/nginx.conf.sigil @@ -48,18 +48,19 @@ server { location / { proxy_pass http://{{ $.APP }}-{{ $upstream_port }}; - add_header 'Cache-Control' 'no-cache'; - add_header 'Content-Type' 'text/event-stream'; - add_header 'Connection' 'keep-alive'; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; + proxy_http_version 1.1; + proxy_set_header Connection ""; proxy_buffering off; - proxy_cache off; - proxy_read_timeout 36000s; - {{ $proxy_settings }} - {{ $cors_headers_options }} - {{ $cors_headers_post }} - {{ $cors_headers_get }} + + add_header 'Access-Control-Allow-Origin' $allow_origin; + add_header 'Access-Control-Allow-Credentials' 'true'; + add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; + add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range'; + if ($request_method = 'OPTIONS') { + add_header 'Access-Control-Max-Age' 1728000; + add_header 'Content-Type' 'text/plain charset=UTF-8'; + add_header 'Content-Length' 0; + return 204; } # Error pages From d33de4c404e7aa24039b492dee34761757017db9 Mon Sep 17 00:00:00 2001 From: Stepan Vladovskiy Date: Wed, 18 Oct 2023 20:24:48 -0300 Subject: [PATCH 3/3] feat: sigil back 3 --- nginx.conf.sigil | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/nginx.conf.sigil b/nginx.conf.sigil index ae771ef..9f7976f 100644 --- a/nginx.conf.sigil +++ b/nginx.conf.sigil @@ -48,19 +48,18 @@ server { location / { proxy_pass http://{{ $.APP }}-{{ $upstream_port }}; - proxy_http_version 1.1; - proxy_set_header Connection ""; + add_header 'Cache-Control' 'no-cache'; + add_header 'Content-Type' 'text/event-stream'; + add_header 'Connection' 'keep-alive'; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; proxy_buffering off; - - add_header 'Access-Control-Allow-Origin' $allow_origin; - add_header 'Access-Control-Allow-Credentials' 'true'; - add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; - add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range'; - if ($request_method = 'OPTIONS') { - add_header 'Access-Control-Max-Age' 1728000; - add_header 'Content-Type' 'text/plain charset=UTF-8'; - add_header 'Content-Length' 0; - return 204; + proxy_cache off; + proxy_read_timeout 36000s; + {{ $proxy_settings }} + {{ $cors_headers_options }} + {{ $cors_headers_post }} + {{ $cors_headers_get }} } # Error pages