Skip to content

Commit

Permalink
chore: add logs for allowed origins
Browse files Browse the repository at this point in the history
  • Loading branch information
sinedied committed Oct 10, 2023
1 parent 8517a36 commit 1af8601
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/search/src/plugins/cors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import cors from '@fastify/cors';
export default fp(
async (fastify) => {
const allowedOrigins = fastify.config.allowedOrigins.split(',').map((origin) => origin.trim());
fastify.log.info(`CORS allowed origins: ${allowedOrigins.join(', ')}`);
fastify.register(cors, {
origin: allowedOrigins,
});
Expand Down

0 comments on commit 1af8601

Please sign in to comment.