Skip to content

Commit ff0390d

Browse files
committed
fix: allow vercel preview builds to access the local connector
1 parent 7a4563b commit ff0390d

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

cli/src/server.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,12 @@ function generateOperationId(): string {
8282
}
8383

8484
const corsOptions: CorsOptions = {
85-
origin: ['https://npmx.dev', /^http:\/\/localhost:\d+$/, /^http:\/\/127.0.0.1:\d+$/],
85+
origin: [
86+
'https://npmx.dev',
87+
/^http:\/\/localhost:\d+$/,
88+
/^http:\/\/127.0.0.1:\d+$/,
89+
/^https:\/\/(.*)\.vercel\.app$/,
90+
],
8691
methods: ['GET', 'POST', 'DELETE', 'OPTIONS'],
8792
allowHeaders: ['Content-Type', 'Authorization'],
8893
}

0 commit comments

Comments
 (0)