Skip to content

Commit 66b2bc9

Browse files
committed
fix: Only allow connections from npmx.dev or localhost:3000
1 parent e76c1f3 commit 66b2bc9

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
@@ -70,7 +70,7 @@ export function createConnectorApp(expectedToken: string) {
7070
onRequest(event) {
7171
// CORS headers for browser connections
7272
setResponseHeaders(event, {
73-
'Access-Control-Allow-Origin': '*',
73+
'Access-Control-Allow-Origin': 'https://npmx.dev, http://localhost:3000',
7474
'Access-Control-Allow-Methods': 'GET, POST, DELETE, OPTIONS',
7575
'Access-Control-Allow-Headers': 'Content-Type, Authorization',
7676
})

0 commit comments

Comments
 (0)