Fix cors issues (#345)
* enable cord * enable cors * enable cors * enable cors * enable cors * enable cors * enable cors * enable cors * enable cors * enable cors * enable cors * enable cors * enable cors * enable cors
This commit is contained in:
parent
6bc37562db
commit
05b8b32a2a
|
@ -1,4 +0,0 @@
|
||||||
more_set_headers 'Access-Control-Allow-Origin: *';
|
|
||||||
more_set_headers 'Access-Control-Allow-Methods: GET, POST, OPTIONS, PUT, DELETE';
|
|
||||||
more_set_headers 'Access-Control-Allow-Headers: DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
|
|
||||||
more_set_headers 'Access-Control-Expose-Headers: Content-Length,Content-Range';
|
|
|
@ -1,9 +1,14 @@
|
||||||
if ($request_method = 'OPTIONS') {
|
if ($request_method = 'OPTIONS') {
|
||||||
add_header 'Access-Control-Allow-Origin' '*';
|
more_set_headers 'Access-Control-Allow-Origin: *';
|
||||||
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
|
more_set_headers 'Access-Control-Allow-Methods: GET, POST, OPTIONS, PUT, DELETE';
|
||||||
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
|
more_set_headers 'Access-Control-Allow-Headers: DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
|
||||||
add_header 'Access-Control-Max-Age' 1728000; # valid for 20 days
|
more_set_headers 'Access-Control-Max-Age: 1728000';
|
||||||
add_header 'Content-Type' 'text/plain; charset=utf-8';
|
more_set_headers 'Content-Type: text/plain; charset=utf-8';
|
||||||
add_header 'Content-Length' 0;
|
more_set_headers 'Content-Length: 0';
|
||||||
return 204;
|
return 204;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
more_set_headers 'Access-Control-Allow-Origin: *';
|
||||||
|
more_set_headers 'Access-Control-Allow-Methods: GET, POST, OPTIONS, PUT, DELETE';
|
||||||
|
more_set_headers 'Access-Control-Allow-Headers: DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range';
|
||||||
|
more_set_headers 'Access-Control-Expose-Headers: Content-Length,Content-Range,Skynet-File-Metadata';
|
||||||
|
|
Reference in New Issue