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


반응형