fix: middleware rewrite based on http req.url
This commit is contained in:
+2
-2
@@ -19,7 +19,7 @@ data:
|
||||
dns cloudflare {env.CF_API_TOKEN}
|
||||
}
|
||||
|
||||
reverse_proxy http://xlog-internal.crossbell.svc:3000 {
|
||||
reverse_proxy xlog-internal.crossbell.svc:3000 {
|
||||
header_up X-Forwarded-Host {host}
|
||||
}
|
||||
}
|
||||
@@ -33,7 +33,7 @@ data:
|
||||
on_demand
|
||||
}
|
||||
|
||||
reverse_proxy http://xlog-internal.crossbell.svc:3000 {
|
||||
reverse_proxy xlog-internal.crossbell.svc:3000 {
|
||||
header_up X-Forwarded-Host {host}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -19,7 +19,7 @@ data:
|
||||
dns cloudflare {env.CF_API_TOKEN}
|
||||
}
|
||||
|
||||
reverse_proxy http://xlog-internal.crossbell.svc:3000 {
|
||||
reverse_proxy xlog-internal.crossbell.svc:3000 {
|
||||
header_up X-Forwarded-Host {host}
|
||||
}
|
||||
}
|
||||
@@ -33,7 +33,7 @@ data:
|
||||
on_demand
|
||||
}
|
||||
|
||||
reverse_proxy http://xlog-internal.crossbell.svc:3000 {
|
||||
reverse_proxy xlog-internal.crossbell.svc:3000 {
|
||||
header_up X-Forwarded-Host {host}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -94,7 +94,7 @@ export default async function middleware(req: NextRequest) {
|
||||
return NextResponse.rewrite(
|
||||
new URL(
|
||||
`/site/${tenant?.subdomain}${pathname}${req.nextUrl.search}`,
|
||||
req.url,
|
||||
req.url.replace("https://", "http://"),
|
||||
),
|
||||
{
|
||||
request: {
|
||||
|
||||
Reference in New Issue
Block a user