Skip to content

Commit f119d22

Browse files
committed
Changed default cors origins in setup command
1 parent 7a2c3d7 commit f119d22

File tree

1 file changed

+2
-2
lines changed
  • packages/wrangler/src/pipelines/cli

1 file changed

+2
-2
lines changed

packages/wrangler/src/pipelines/cli/setup.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ async function setupStreamConfiguration(
132132
});
133133
}
134134

135-
let corsOrigins = ["*"];
135+
let corsOrigins: string[] | undefined;
136136
if (httpEnabled) {
137137
const customCors = await confirm("Configure custom CORS origins?", {
138138
defaultValue: false,
@@ -153,7 +153,7 @@ async function setupStreamConfiguration(
153153
http: {
154154
enabled: httpEnabled,
155155
authentication: httpAuth,
156-
...(httpEnabled && { cors: { origins: corsOrigins } }),
156+
...(httpEnabled && corsOrigins && { cors: { origins: corsOrigins } }),
157157
},
158158
worker_binding: { enabled: true },
159159
...(schema && { schema: { fields: schema } }),

0 commit comments

Comments
 (0)