Skip to content

Commit

Permalink
fix: use correct host value in middleware (#316)
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr authored Dec 17, 2024
1 parent aea1e87 commit 49d5de1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/nextjs/src/middleware/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export async function proxyRequest(request: NextRequest, options: OryConfig) {
request.headers,
options.forwardAdditionalHeaders,
)
upstreamRequestHeaders.set("Host", upstreamUrl.hostname)
upstreamRequestHeaders.set("Host", upstreamUrl.host)

// Ensures we use the correct URL in redirects like OIDC redirects.
upstreamRequestHeaders.set("Ory-Base-URL-Rewrite", selfUrl.toString())
Expand Down

0 comments on commit 49d5de1

Please sign in to comment.