使用nginx反向代理,解决vue上线部署跨域问题解决
将http://127.0.0.1:8086 换成你自己的即可!看不懂可留言!
location /chemical { proxy_pass http://127.0.0.1:8086; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; }
点赞(1)
评论