6
我希望我的服务器允许我的移动应用程序的'授权'标头。目前我的网络服务器在帆,我用帆。我的路线代码是如何在CORS允许航行标头
'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.
是“授权”报头,也允许我怎么在我的路线代码中指定?
我该如何对所有路线一次做到这一点? – raju
使用'cors:true'和[config.cors.js](http://sailsjs.org/documentation/reference/configuration/sails-config-cors),setup [here](http://sailsjs.org/文档/概念/安全/ CORS).Regards。 –