Skip to content

Commit

Permalink
Updated cors config
Browse files Browse the repository at this point in the history
  • Loading branch information
richardeschloss committed Nov 18, 2021
1 parent cc46549 commit b09cbf0
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,22 +78,7 @@ export default {
// @ts-ignore
cors: {
credentials: true,
// allowedHeaders: ['Content-Type', 'Authorization'],
origin: ['https://nuxt-socket-io.netlify.app'],
// methods: ['GET', 'POST']
// origin (origin, callback) {
// const whitelist = [
// // 'http://localhost:3001', // Works for local dev
// 'https://nuxt-socket-io.netlify.app'
// ]
// console.log('origin', origin)
// if (whitelist.includes(origin)) {
// console.log('white list includes origin!', origin)
// callback(null, true)
// } else {
// callback(new Error('Not allowed by CORS'))
// }
// }
origin: ['https://nuxt-socket-io.netlify.app']
}
},
sockets: [
Expand Down

0 comments on commit b09cbf0

Please sign in to comment.