首页 > 应用开发 > > chrome浏览器移动端模式的跨域问题
我在前端的请求是这样的:

我在服务端用 http-proxy-middleware 做了代理:

用谷歌浏览器测试,pc 端请求成功,而移动端模式报错:
Failed to load https://m.ac.qq.com/Recommend/get/: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8088' is therefore not allowed access.
可以看到,请求地址代理到了 https://m.ac.qq.com/,但是我明明写的是 https://ac.qq.com/ ,请问这个问题该怎么解决?
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/1409/viewspace-3158466/ ,如需转载,请注明出处,否则将追究法律责任。