chore: replaced hardcoded values with env variables in app.module.ts, main.ts and utils.ts

This commit is contained in:
Balu Babu
2023-01-20 07:56:19 +05:30
parent 509604833e
commit a6ad86bd59
6 changed files with 22 additions and 7 deletions

View File

@@ -19,8 +19,10 @@ async function bootstrap() {
if (process.env.PRODUCTION === 'false') {
console.log('Enabling CORS with development settings');
app.enableCors({
origin: true,
origin: process.env.WHITELISTED_ORIGINS.split(','),
credentials: true,
});
} else {
console.log('Enabling CORS with production settings');