chore: force http for caddy reverse_proxy

This commit is contained in:
DIYgod 2023-08-21 23:47:01 +01:00
parent 1832ada8a9
commit 7cf6df6fb1
No known key found for this signature in database
3 changed files with 8 additions and 5 deletions

View File

@ -19,7 +19,7 @@ data:
dns cloudflare {env.CF_API_TOKEN}
}
reverse_proxy xlog-internal.crossbell.svc:3000 {
reverse_proxy http://xlog-internal.crossbell.svc:3000 {
header_up X-Forwarded-Host {host}
}
}
@ -33,7 +33,7 @@ data:
on_demand
}
reverse_proxy xlog-internal.crossbell.svc:3000 {
reverse_proxy http://xlog-internal.crossbell.svc:3000 {
header_up X-Forwarded-Host {host}
}
}

View File

@ -19,7 +19,7 @@ data:
dns cloudflare {env.CF_API_TOKEN}
}
reverse_proxy xlog-internal.crossbell.svc:3000 {
reverse_proxy http://xlog-internal.crossbell.svc:3000 {
header_up X-Forwarded-Host {host}
}
}
@ -33,7 +33,7 @@ data:
on_demand
}
reverse_proxy xlog-internal.crossbell.svc:3000 {
reverse_proxy http://xlog-internal.crossbell.svc:3000 {
header_up X-Forwarded-Host {host}
}
}

View File

@ -92,7 +92,10 @@ export default async function middleware(req: NextRequest) {
if (tenant?.subdomain) {
return NextResponse.rewrite(
new URL(`/site/${tenant?.subdomain}${pathname}`, req.url),
new URL(
`/site/${tenant?.subdomain}${pathname}${req.nextUrl.search}`,
req.url,
),
{
request: {
headers: requestHeaders,