This commit is contained in:
parent
99b0748129
commit
3968bc3910
|
@ -6,7 +6,7 @@
|
||||||
{{ $cors_headers_get := "if ($request_method = 'GET') { add_header 'Access-Control-Allow-Origin' '$allow_origin' always; add_header 'Access-Control-Allow-Credentials' 'true' 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; }" }}
|
{{ $cors_headers_get := "if ($request_method = 'GET') { add_header 'Access-Control-Allow-Origin' '$allow_origin' always; add_header 'Access-Control-Allow-Credentials' 'true' 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; }" }}
|
||||||
|
|
||||||
map $http_origin $allow_origin {
|
map $http_origin $allow_origin {
|
||||||
~^https?:\/\/((.*\.)?localhost(:\d+)?|(.*\.)?dscrs\.site|(.*\.)?discours\.io)$ $http_origin;
|
~^https?:\/\/((.*\.)?localhost(:\d+)?|(.*\.)?dscrs\.site|(.*\.)?discours\.io|(.*\.)?testing\.dscrs\.site)$ $http_origin;
|
||||||
default "";
|
default "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,16 +69,6 @@ server {
|
||||||
limit_req zone=req_zone burst=10 nodelay;
|
limit_req zone=req_zone burst=10 nodelay;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Custom location block for /upload
|
|
||||||
location /upload {
|
|
||||||
proxy_pass http://uploader-8080/;
|
|
||||||
{{ $proxy_settings }}
|
|
||||||
{{ $gzip_settings }}
|
|
||||||
{{ $cors_headers_options }}
|
|
||||||
{{ $cors_headers_post }}
|
|
||||||
{{ $cors_headers_get }}
|
|
||||||
}
|
|
||||||
|
|
||||||
location ~* \.(jpg|jpeg|png|gif|ico|css|js)$ {
|
location ~* \.(jpg|jpeg|png|gif|ico|css|js)$ {
|
||||||
expires 30d; # This means that the client can cache these resources for 30 days.
|
expires 30d; # This means that the client can cache these resources for 30 days.
|
||||||
add_header Cache-Control "public, no-transform";
|
add_header Cache-Control "public, no-transform";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user