feat: remove debug

This commit is contained in:
DIYgod 2023-08-23 18:39:59 +01:00
parent f8c6e509e6
commit 2184dfa06f
No known key found for this signature in database
1 changed files with 0 additions and 12 deletions

View File

@ -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}${