Skip to content

Open-source status page, incident response and uptime monitoring

fix: middleware (#206)

Maximilian Kaske4242d8bd92c9
diff --git a/apps/web/src/middleware.ts b/apps/web/src/middleware.ts
index e6f40f8fc..d734e0d2c 100644
--- a/apps/web/src/middleware.ts
+++ b/apps/web/src/middleware.ts
@@ -43,7 +43,10 @@ export const getValidSubdomain = (host?: string | null) => {
}
}
// In case the host is a custom domain
- if (host && !host?.includes(env.NEXT_PUBLIC_URL)) {
+ if (
+ host &&
+ !(host?.includes(env.NEXT_PUBLIC_URL) || host?.endsWith(".vercel.app"))
+ ) {
subdomain = host;
}
return subdomain;