Skip to content

Commit

Permalink
feat: add logging to display CORS allowed domains
Browse files Browse the repository at this point in the history
  • Loading branch information
seansica committed Dec 30, 2024
1 parent fea9a62 commit 86222fa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ function setupCors(app, config, logger) {
return; // Skip setting up the CORS middleware
}

logger.info('CORS is enabled');
const cors = require('cors');

// Normalize corsAllowedOrigins to an array of origins
Expand All @@ -75,6 +74,8 @@ function setupCors(app, config, logger) {
};

app.use(cors(corsOptions));

logger.info(`CORS is enabled for domains: ${origins}`)
}

/**
Expand Down

0 comments on commit 86222fa

Please sign in to comment.