lang/node
Origin Policy Error on Sailsjs
C/H
2019. 3. 20. 17:16
- Sails.js global CORS config not working, per-route is
- Access-Control-Allow-Headers On Cross-Origin Resource Sharing (CORS) MDN
- Access-Control-Request-Headers On Cross-Origin Resource Sharing (CORS) MDN
- sails.config.security
# config/security.js module.exports.security = { cors: { allRoutes: true, allowOrigins: '*', allowCredentials: false, allowRequestMethods: 'GET, POST, PUT, DELETE, OPTIONS, HEAD', allowRequestHeaders: 'content-type, authorization', allowResponseHeaders: '*', allowAnyOriginWithCredentialsUnsafe: true, }, };
반응형