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

前后端分离下,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 关注
  • 2469 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信