Skip to content

Commit

Permalink
fix: show validations on headers
Browse files Browse the repository at this point in the history
  • Loading branch information
Keemluvr committed Jun 17, 2024
1 parent 022bf51 commit 32cc25c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/middleware/cors.middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class CorsMiddleware implements NestMiddleware {

const startAndEndWithAllowedOrigin =
origin.startsWith(`${siteName}-`) && origin.endsWith(`-${id}.vercel.app`);
console.log(siteName, `${id}.vercel.app`, startAndEndWithAllowedOrigin);
console.log(siteName, `${id}.vercel.app`, origin.startsWith(`${siteName}-`) , origin.endsWith(`-${id}.vercel.app`) startAndEndWithAllowedOrigin);

if (!isAllowedOrigin && !startAndEndWithAllowedOrigin) {
throw new UnauthorizedException({ message: 'Not allowed origin' });
Expand Down

0 comments on commit 32cc25c

Please sign in to comment.