We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4b56c24 commit ea30ac7Copy full SHA for ea30ac7
packages/fern-docs/bundle/src/app/[host]/[domain]/api/fern-docs/auth/sso/callback/route.ts
@@ -72,7 +72,10 @@ export async function GET(req: NextRequest): Promise<NextResponse> {
72
}
73
74
// TODO: need to support docs instances with subpaths (forward-proxied from the origin).
75
- const destination = new URL(domain, url.origin);
+ const destination = new URL(
76
+ `${req.nextUrl.pathname}${req.nextUrl.search}`,
77
+ url.origin
78
+ );
79
destination.searchParams.set(FORWARDED_HOST_QUERY, req.nextUrl.host);
80
const allowedDestinations = [withDefaultProtocol(getDocsDomainEdge(req))];
81
0 commit comments