Skip to content

Commit

Permalink
add CORS origins
Browse files Browse the repository at this point in the history
  • Loading branch information
levg34 committed May 1, 2024
1 parent d0537c9 commit e1c4513
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ const helmet = require("helmet")
app.use(helmet({
contentSecurityPolicy: false
}))
app.use(cors())
app.options('*', cors())
const corsWithOptions = cors({
origin: ['*.nicolasdross.fr', 'nicolasdross.fr']
})
app.use(corsWithOptions)
app.options('*', corsWithOptions)

const axios = require('axios')

Expand Down

0 comments on commit e1c4513

Please sign in to comment.