cross-domain.conf

跨域扩展添加
This commit is contained in:
徐瑞 2020-03-28 17:15:51 +08:00
parent 75993e1128
commit a59b1cdc4e

8
files/cross-domain.conf Normal file
View File

@ -0,0 +1,8 @@
add_header Access-Control-Allow-Origin $http_origin always;
add_header Access-Control-Allow-Methods 'POST,GET,PUT,PATCH,OPTIONS,DELETE';
add_header Access-Control-Max-Age '3600';
add_header Access-Control-Allow-Headers $http_access_control_request_headers;
add_header Access-Control-Allow-Credentials 'true';
if ($request_method = 'OPTIONS') {
return 200;
}