最後活躍 1713935259

cors-support.conf 原始檔案
1set $cors '';
2if ($http_origin ~ '^https?://(localhost|www\.qrh\.app|www\.qrh\.hair|qrh\.app|qrh\.hair|stats\.wp\.com|sis-t\.redsys\.es|secure\.gravatar\.com)') {
3 set $cors 'true';
4}
5
6if ($cors = 'true') {
7 add_header 'Access-Control-Allow-Origin' "$http_origin" always;
8 add_header 'Access-Control-Allow-Credentials' 'true' always;
9 add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS' always;
10 add_header 'Access-Control-Allow-Headers' 'Accept,Authorization,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Requested-With' always;
11 # required to be able to read Authorization header in frontend
12 #add_header 'Access-Control-Expose-Headers' 'Authorization' always;
13}
14
15if ($request_method = 'OPTIONS') {
16 # Tell client that this pre-flight info is valid for 20 days
17 add_header 'Access-Control-Max-Age' 1728000;
18 add_header 'Content-Type' 'text/plain charset=UTF-8';
19 add_header 'Content-Length' 0;
20 return 204;
21}
22
23