Commit dae87113 authored by nanahira's avatar nanahira

add cors

parent 80984b5e
Pipeline #21207 failed with stages
in 1 minute and 39 seconds
......@@ -170,6 +170,15 @@ http {
{{#headers}}
add_header {{name}} "{{value}}" always;
{{/headers}}
{{#cors}}
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Methods "GET, POST, OPTIONS, PUT, DELETE, PATCH, PATCH" 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-Max-Age 1728000 always;
if ($request_method = 'OPTIONS') {
return 204;
}
{{/cors}}
{{#normalizeDomain}}
if ($host != "{{.}}") {
return 301 $scheme://{{.}}$request_uri;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment