feat: remove debug
This commit is contained in:
@@ -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}${
|
||||
|
||||
Reference in New Issue
Block a user