lang/node

Origin Policy Error on Sailsjs

C/H 2019. 3. 20. 17:16

# 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,
  },
};


반응형

'lang > node' 카테고리의 다른 글

NPM Permission Error  (0) 2019.11.13
jwtwebtoken  (0) 2019.04.12
not support route and folder fot sails.js  (0) 2019.03.04
Sails Restful-api Tutorials  (0) 2019.02.22
Full Stack Framework Sails.js For Node.js  (0) 2019.02.14