Below was my config/cors.js configuration to allow all origins
allRoutes: true,
origin: '*',
credentials: false,
methods: 'GET, POST, PUT, DELETE, OPTIONS, HEAD',
headers: 'content-type,apikey,token'
apikey, token were the extra headers passed in from app side.
references:
https://medium.com/@makarakao/sails-js-cors-problem-954f94ccf676
allRoutes: true,
origin: '*',
credentials: false,
methods: 'GET, POST, PUT, DELETE, OPTIONS, HEAD',
headers: 'content-type,apikey,token'
apikey, token were the extra headers passed in from app side.
references:
https://medium.com/@makarakao/sails-js-cors-problem-954f94ccf676
No comments:
Post a Comment