Skip to content

Commit c1e4c12

Browse files
authored
fix(cli): allow any localhost port in CORS config (#93)
1 parent 2263784 commit c1e4c12

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cli/src/server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function generateOperationId(): string {
3737
}
3838

3939
const corsOptions: CorsOptions = {
40-
origin: ['https://npmx.dev', 'http://localhost:3000'],
40+
origin: ['https://npmx.dev', /^http:\/\/localhost:\d+$/],
4141
methods: ['GET', 'POST', 'DELETE', 'OPTIONS'],
4242
allowHeaders: ['Content-Type', 'Authorization'],
4343
}

0 commit comments

Comments
 (0)