Skip to content

Commit

Permalink
cors domain
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenGrider committed Jul 15, 2020
1 parent 1a36ec1 commit 67f663d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ const app = express();

app.use(
cors({
origin: 'http://localhost:3000',
origin:
process.env.NODE_ENV === 'production'
? 'https://pg-sql.vercel.app'
: 'http://localhost:3000',
credentials: true,
})
);
Expand Down

0 comments on commit 67f663d

Please sign in to comment.