Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const corsOptions = {
- origin: (origin, callback) => {
- callback(null, true);
- },
- credentials: true,
- methods: ['GET', 'PUT', 'POST', 'OPTIONS', 'DELETE', 'PATCH'],
- headers: ['x-user', 'X-Signature', 'accept', 'content-type'],
- };
- this.app.use(cors(corsOptions));
- this.app.options('*', cors());
Advertisement
Add Comment
Please, Sign In to add comment