|
@@ -1,4 +1,5 @@
|
|
|
-server {
|
|
|
+server
|
|
|
+{
|
|
|
listen 80;
|
|
|
listen 443 ssl http2;
|
|
|
|
|
@@ -9,21 +10,26 @@ server {
|
|
|
ssl_ciphers HIGH:!RC4:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!EXP:+MEDIUM;
|
|
|
ssl_prefer_server_ciphers on;
|
|
|
ssl_session_timeout 5m;
|
|
|
-
|
|
|
- add_header Access-Control-Allow-Origin *;
|
|
|
- add_header Access-Control-Allow-Headers X-Requested-With;
|
|
|
- add_header Access-Control-Allow-Methods GET,POST,OPTIONS;
|
|
|
-
|
|
|
+
|
|
|
charset utf-8;
|
|
|
-
|
|
|
server_name api-debug.xinyueyouxi.com;
|
|
|
-
|
|
|
location / {
|
|
|
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
+ proxy_set_header Remote_addr $remote_addr;
|
|
|
+ proxy_set_header X-Real_IP $remote_addr;
|
|
|
+ proxy_set_header Host $host;
|
|
|
+ proxy_connect_timeout 600s;
|
|
|
+ proxy_send_timeout 600s;
|
|
|
+ proxy_read_timeout 600s;
|
|
|
+ proxy_redirect off;
|
|
|
+ proxy_http_version 1.1;
|
|
|
+ add_header Access-Control-Allow-Origin *;
|
|
|
+ add_header Access-Control-Allow-Methods 'GET,POST,PUT,OPTIONS,PATCH,DELETE,HEAD';
|
|
|
+ add_header Access-Control-Allow-Headers 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization,token,x-ts,x-sign,x-uid,x-nonce';
|
|
|
+
|
|
|
+ if ($request_method = 'OPTIONS') {
|
|
|
+ return 204;
|
|
|
+ }
|
|
|
proxy_pass http://sharesrv2-svc-nei:6999;
|
|
|
- }
|
|
|
-
|
|
|
- location /favicon.ico {
|
|
|
- log_not_found off;
|
|
|
- access_log off;
|
|
|
- }
|
|
|
+ }
|
|
|
}
|