Skip to content

Commit

Permalink
fix: server functions x-forwarded-host multiple values
Browse files Browse the repository at this point in the history
  • Loading branch information
Netail committed Dec 9, 2024
1 parent 6aceae2 commit 3096cb7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/next/src/server/app-render/action-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -488,9 +488,7 @@ export async function handleAction({
? new URL(req.headers['origin']).host
: undefined

const forwardedHostHeader = req.headers['x-forwarded-host'] as
| string
| undefined
const forwardedHostHeader = req.headers['x-forwarded-host']?.[0]
const hostHeader = req.headers['host']
const host: Host = forwardedHostHeader
? {
Expand Down

0 comments on commit 3096cb7

Please sign in to comment.