nginx:解决跨域访问路径重定向

location /api {
rewrite ^/api/(.*)$ /$1 break;//api访问地址重定向,$1代表api路径后面部分
proxy_pass http://192.168.3.123; //重定向能地址
}
展开
评论