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" ;