Skip to content

Commit

Permalink
refactor: remove unnecessary for cors
Browse files Browse the repository at this point in the history
  • Loading branch information
albert-byiringiro committed Dec 19, 2024
1 parent 5e7b7fe commit e02cec6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions server/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ async function bootstrap() {

app.enableCors({
origin: [
process.env.NODE_ENV === 'production'
? 'https://votefusion-client.onrender.com'
: `http://localhost:${clientPort}`,
`http://localhost:${clientPort}`,
new RegExp(`/^http:\/\/192\.168\.1\.([1-9]|[1-9]\d):${clientPort}$/`),
],
credentials: true,
Expand Down

0 comments on commit e02cec6

Please sign in to comment.