Skip to content

Commit 2fcae1d

Browse files
ijjkhuozhi
authored andcommitted
Update default allowed origins list (#77212)
Per feedback in #76880 this ensures we ocnsider `*.localhost` as allowed by default for the dev origins list.
1 parent adf5462 commit 2fcae1d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/next/src/server/lib/router-server.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,11 @@ export async function initialize(opts: {
172172
;(globalThis as any)[Symbol.for('@next/middleware-subrequest-id')] =
173173
middlewareSubrequestId
174174

175-
const allowedOrigins = ['localhost', ...(config.allowedDevOrigins || [])]
175+
const allowedOrigins = [
176+
'*.localhost',
177+
'localhost',
178+
...(config.allowedDevOrigins || []),
179+
]
176180
if (opts.hostname) {
177181
allowedOrigins.push(opts.hostname)
178182
}

0 commit comments

Comments
 (0)