feat: remove debug
This commit is contained in:
parent
f8c6e509e6
commit
2184dfa06f
|
|
@ -11,10 +11,6 @@ const HTTPWhitelistPaths = ["/api/healthcheck"]
|
|||
export default async function middleware(req: NextRequest) {
|
||||
const { pathname } = req.nextUrl
|
||||
|
||||
for (const [key, value] of req.headers.entries()) {
|
||||
console.debug(`${key}: ${value}`)
|
||||
}
|
||||
|
||||
if (
|
||||
IS_PROD &&
|
||||
req.headers.get("x-forwarded-proto") !== "https" &&
|
||||
|
|
@ -104,14 +100,6 @@ export default async function middleware(req: NextRequest) {
|
|||
requestHeaders.set("x-xlog-ip", getClientIp(req) || "")
|
||||
|
||||
if (tenant?.subdomain) {
|
||||
console.debug(
|
||||
`Rewrite to ${new URL(
|
||||
`/site/${tenant?.subdomain}${pathname === "/" ? "" : pathname}${
|
||||
req.nextUrl.search
|
||||
}`,
|
||||
req.url,
|
||||
)}`,
|
||||
)
|
||||
return NextResponse.rewrite(
|
||||
new URL(
|
||||
`/site/${tenant?.subdomain}${pathname === "/" ? "" : pathname}${
|
||||
|
|
|
|||
Loading…
Reference in New Issue