Skip to content

Commit

Permalink
chore: allow cors without tld
Browse files Browse the repository at this point in the history
  • Loading branch information
JGiter committed Apr 3, 2023
1 parent c2b949e commit c365735
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/cors.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export function corsConfig(app: INestApplication) {
const configService = app.get(ConfigService);
const allowedOrigins = configService.get('ALLOWED_ORIGINS').split(',');
for (const origin of allowedOrigins) {
if (!isURL(origin)) {
if (!isURL(origin, { require_tld: false })) {
throw new Error(`Origin ${origin} is not a valid URL`);
}
}
Expand Down

0 comments on commit c365735

Please sign in to comment.