为了账号安全,请及时绑定邮箱和手机立即绑定

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

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

蛊毒传说 2018-09-24 15:53:10
前端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仍然无效。百思不得姐,求教高手!
查看完整描述

1 回答

  • 1 回答
  • 0 关注
  • 2501 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号