【发布时间】:2015-10-08 11:40:48
【问题描述】:
我希望我的服务器允许我的移动应用使用“授权”标头。目前我的网络服务器在风帆中,我使用风帆。我的路线代码是
'post /auth/local' : {
cors: {
origin: '*'
},
controller: 'AuthController',
action: 'callback'
},
当我的客户在标头中发送带有“授权”的请求时,我收到错误
XMLHttpRequest cannot load http://localhost:1337/auth/local.
Request header field Authorization is not allowed by Access-Control-Allow-Headers.
如何在我的路由代码中指定也允许“授权”标头?
【问题讨论】:
标签: javascript express routes cors sails.js