Commit 2fcae1d7 authored by JJ Kasper's avatar JJ Kasper Committed by Jiachi Liu

Update default allowed origins list (#77212)

Per feedback in https://github.com/vercel/next.js/pull/76880 this
ensures we ocnsider `*.localhost` as allowed by default for the dev
origins list.
parent adf5462b
...@@ -172,7 +172,11 @@ export async function initialize(opts: { ...@@ -172,7 +172,11 @@ export async function initialize(opts: {
;(globalThis as any)[Symbol.for('@next/middleware-subrequest-id')] = ;(globalThis as any)[Symbol.for('@next/middleware-subrequest-id')] =
middlewareSubrequestId middlewareSubrequestId
const allowedOrigins = ['localhost', ...(config.allowedDevOrigins || [])] const allowedOrigins = [
'*.localhost',
'localhost',
...(config.allowedDevOrigins || []),
]
if (opts.hostname) { if (opts.hostname) {
allowedOrigins.push(opts.hostname) allowedOrigins.push(opts.hostname)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment