前后端分离下,egg如何设置跨域

前端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
仍然无效。百思不得姐,求教高手!

蛊毒传说
浏览 2470回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript