From 048e110ce603a1ad94657b768aa2ff1ac85eb98a Mon Sep 17 00:00:00 2001 From: Stepan Vladovskiy Date: Wed, 11 Oct 2023 09:16:05 -0300 Subject: [PATCH] debug: errors with new lines --- nginx.conf.sigil | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nginx.conf.sigil b/nginx.conf.sigil index a83a09c..68ef8da 100644 --- a/nginx.conf.sigil +++ b/nginx.conf.sigil @@ -1,12 +1,12 @@ # sigil ver 2.1 dufok 2022-10-11 # Proxy settings -{{ $proxy_settings := 'proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $http_connection; proxy_set_header Host $http_host; proxy_set_header X-Request-Start $msec;' }} +{{ $proxy_settings := "proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $http_connection; proxy_set_header Host $http_host; proxy_set_header X-Request-Start $msec;" }} # GZIP settings -{{ $gzip_settings := 'gzip on; gzip_min_length 1100; gzip_buffers 4 32k; gzip_types text/css text/javascript text/xml text/plain text/x-component application/javascript application/x-javascript application/json application/xml application/rss+xml font/truetype application/x-font-ttf font/opentype application/vnd.ms-fontobject image/svg+xml; gzip_vary on; gzip_comp_level 6;' }} +{{ $gzip_settings := "gzip on; gzip_min_length 1100; gzip_buffers 4 32k; gzip_types text/css text/javascript text/xml text/plain text/x-component application/javascript application/x-javascript application/json application/xml application/rss+xml font/truetype application/x-font-ttf font/opentype application/vnd.ms-fontobject image/svg+xml; gzip_vary on; gzip_comp_level 6;" }} # CORS headers based on request methods -{{ $cors_headers_options := 'if ($request_method = "OPTIONS") { add_header "Access-Control-Allow-Origin" "$allow_origin" always; 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,Authorization"; add_header "Access-Control-Allow-Credentials" "true"; add_header "Access-Control-Max-Age" 1728000; add_header "Content-Type" "text/plain; charset=utf-8"; add_header "Content-Length" 0; return 204; }' }} -{{ $cors_headers_post := 'if ($request_method = "POST") { add_header "Access-Control-Allow-Origin" "$allow_origin" always; add_header "Access-Control-Allow-Methods" "GET, POST, OPTIONS" always; add_header "Access-Control-Allow-Headers" "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization" always; add_header "Access-Control-Expose-Headers" "Content-Length,Content-Range" always; add_header "Access-Control-Allow-Credentials" "true" always; }' }} -{{ $cors_headers_get := 'if ($request_method = "GET") { add_header "Access-Control-Allow-Origin" "$allow_origin" always; add_header "Access-Control-Allow-Methods" "GET, POST, OPTIONS" always; add_header "Access-Control-Allow-Headers" "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization" always; add_header "Access-Control-Expose-Headers" "Content-Length,Content-Range" always; add_header "Access-Control-Allow-Credentials" "true" always; }' }} +{{ $cors_headers_options := "if ($request_method = "OPTIONS") { add_header "Access-Control-Allow-Origin" "$allow_origin" always; 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,Authorization"; add_header "Access-Control-Allow-Credentials" "true"; add_header "Access-Control-Max-Age" 1728000; add_header "Content-Type" "text/plain; charset=utf-8"; add_header "Content-Length" 0; return 204; }" }} +{{ $cors_headers_post := "if ($request_method = "POST") { add_header "Access-Control-Allow-Origin" "$allow_origin" always; add_header "Access-Control-Allow-Methods" "GET, POST, OPTIONS" always; add_header "Access-Control-Allow-Headers" "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization" always; add_header "Access-Control-Expose-Headers" "Content-Length,Content-Range" always; add_header "Access-Control-Allow-Credentials" "true" always; }" }} +{{ $cors_headers_get := "if ($request_method = "GET") { add_header "Access-Control-Allow-Origin" "$allow_origin" always; add_header "Access-Control-Allow-Methods" "GET, POST, OPTIONS" always; add_header "Access-Control-Allow-Headers" "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization" always; add_header "Access-Control-Expose-Headers" "Content-Length,Content-Range" always; add_header "Access-Control-Allow-Credentials" "true" always; }" }} # Mapping for allowed origins map $http_origin $allow_origin {