Skip to content

Connect, collaborate, and grow with a community of TypeScript developers

fix: middleware

bautistaaa92af432c333f
diff --git a/apps/web/src/middleware.ts b/apps/web/src/middleware.ts
index ae1f572e..e2f784da 100644
--- a/apps/web/src/middleware.ts
+++ b/apps/web/src/middleware.ts
@@ -1,10 +1,9 @@
import { NextResponse, type NextRequest } from 'next/server';
-const STAGING_DOMAIN = 'staging.typehero.dev';
+const STAGING_DOMAIN = 'web-staging';
export function middleware(req: NextRequest) {
- console.log({ VERCEL_ENV: process.env.VERCEL_ENV, VERCEL_URL: process.env.VERCEL_URL });
// skip blocking the request if we are on staging or local
- if (!process.env.VERCEL_ENV || process.env.VERCEL_URL === STAGING_DOMAIN) {
+ if (!process.env.VERCEL_ENV || process.env.VERCEL_URL?.includes(STAGING_DOMAIN)) {
return NextResponse.next();
}