feat: sv nginx conf sigil without map function, becasue it is moved to global nginx config
Some checks failed
deploy / deploy (push) Failing after 38s

This commit is contained in:
Stepan Vladovskiy 2025-01-29 16:31:41 -03:00
parent 76186df2b0
commit 2173da2cad

View File

@ -9,10 +9,7 @@
{{ $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 {
~^https?:\/\/((.*\.)?localhost(:\d+)?|discoursio-webapp(-(.*))?\.vercel\.app|(.*\.)?discours\.io)$ $http_origin;
default "";
}
# is moved to globL NGINX
# Server block setup
{{ range $port_map := .PROXY_PORT_MAP | split " " }}