前端url是
http://localhost:3333/index.html#/detail这样的格式
访问后端,报跨域错误
No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3333' is therefore not allowed access.
请问后端如何设置
config.default.js里设置白名单:
http://localhost:3333/index.html#/detail
仍然无效。百思不得姐,求教高手!
不设置白名单,直接在egg跨域插件配置的origin里面指定访问域名并开启认证模式就好了