Vermilliest

Untitled

Apr 8th, 2018
1,072
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.             const corsOptions = {
  2.                 origin: (origin, callback) => {
  3.                     callback(null, true);
  4.                 },
  5.                 credentials: true,
  6.                 methods: ['GET', 'PUT', 'POST', 'OPTIONS', 'DELETE', 'PATCH'],
  7.                 headers: ['x-user', 'X-Signature', 'accept', 'content-type'],
  8.             };
  9.  
  10.             this.app.use(cors(corsOptions));
  11.             this.app.options('*', cors());
Advertisement
Add Comment
Please, Sign In to add comment