Skip to content

Commit

Permalink
fix: use hostname in middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Dec 17, 2024
1 parent c0ab382 commit d337f41
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 d337f41

Please sign in to comment.