Nginix代理处理跨域问题

慈云数据 2024-05-13 技术支持 36 0

loCation /HYRD {
                        add_header 'Access-Control-Allow-Origin' *;
                        add_header 'Access-Control-Allow-Credentials' 'true';
                        add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
                        add_header 'Access-Control-Allow-Headers' 'DNT,X-Mx-ReQtoken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,authorize_token';
                        proxy_pass  https://hycmis.shenghongpec.com:8888/;
                }

location /proxypath6/ {
                        add_header 'Access-Control-Allow-Origin' *;
                        add_header 'Access-Control-Allow-Credentials' 'true';
                        add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
                   

Nginix代理处理跨域问题
(图片来源网络,侵删)
微信扫一扫加客服

微信扫一扫加客服

点击启动AI问答
Draggable Icon