From fe184bb98f869a30c903b15df3dfb3fd005514f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A6=83=E6=98=8C=E6=B3=A2?= Date: Mon, 11 Apr 2022 11:05:13 +0000 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20nginx.conf?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nginx.conf | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/nginx.conf b/nginx.conf index d7cd7e1..588cd6f 100644 --- a/nginx.conf +++ b/nginx.conf @@ -5,27 +5,16 @@ server { client_max_body_size 200m; location / { - add_header 'Access-Control-Allow-Origin' '*' always; - add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, HEAD, PUT, DELETE, TRACE, CONNECT'; - add_header 'Access-Control-Allow-Headers' 'Authorization,Content-Type,Accept,Origin,User-Agent,DNT,Cache-Control,X-Mx-ReqToken,X-Requested-With,token,terminalType'; - add_header 'Access-Control-Max-Age' 86400; - add_header 'Content-Type' 'text/plain charset=UTF-8'; - -if ($request_method = 'OPTIONS') { - add_header 'Access-Control-Allow-Origin' $http_origin always; - add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS, HEAD, PUT, DELETE, TRACE, CONNECT'; - add_header 'Access-Control-Allow-Headers' 'Authorization,Content-Type,Accept,Origin,User-Agent,DNT,Cache-Control,X-Mx-ReqToken,X-Requested-With,token,terminalType'; - add_header 'Access-Control-Max-Age' 86400; - add_header 'Content-Length' 0; - return 204; -} - if ($request_filename ~* .*\.(?:htm|html)$) { add_header Cache-Control "no-store"; } root /usr/share/nginx/html; try_files $uri @index ; } + + location /mall { + proxy_pass http://k8s-horse-gateway.mashibing.cn/; + } location @index { add_header Cache-Control "no-store" ;