|
@@ -13,9 +13,7 @@ server {
|
|
|
add_header 'Access-Control-Allow-Origin' '*';
|
|
|
add_header 'Access-Control-Allow-Credentials' 'true' ;
|
|
|
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
|
|
|
- if ($request_method = 'OPTIONS') {
|
|
|
- return 204;
|
|
|
- }
|
|
|
+
|
|
|
charset utf-8;
|
|
|
|
|
|
server_name api-debug.xinyueyouxi.com;
|
|
@@ -28,6 +26,9 @@ server {
|
|
|
proxy_set_header X-CROS true; # 自定义,有做跨域的时候需要加,后端会做判断
|
|
|
proxy_redirect off;
|
|
|
proxy_http_version 1.1;
|
|
|
+ if ($request_method = 'OPTIONS') {
|
|
|
+ return 204;
|
|
|
+ }
|
|
|
proxy_pass http://sharesrv2-svc:9092;
|
|
|
}
|
|
|
|