diff --git a/next.config.js b/next.config.js index 41783661..e4d39424 100644 --- a/next.config.js +++ b/next.config.js @@ -6,7 +6,7 @@ const withNextIntl = createNextIntlPlugin('./src/app/[locale]/i18n.ts'); const nextConfig = { assetPrefix: (process.env.VERCEL_ENV && process.env.VERCEL_ENV !== 'production' - ? process.env.VERCEL_URL + ? `https://${process.env.VERCEL_URL}` : process.env.NEXUS_HOST) || 'https://nyx.dreampip.com', transpilePackages: ['next-auth'], images: { diff --git a/src/middleware.ts b/src/middleware.ts index bd70a4df..fb11cd2f 100644 --- a/src/middleware.ts +++ b/src/middleware.ts @@ -13,7 +13,9 @@ export const config = { const blocklist = ['_next']; export default async function middleware(request: NextRequest) { - if (blocklist.some((pattern) => request?.nextUrl?.pathname?.includes(pattern))) { + const url = request?.nextUrl?.pathname + if (blocklist.some((pattern) => url?.includes(pattern))) { + console.log("--- PATTERN BOCKED: ---", url) return NextResponse.next(); } // if a response is returned, return it otherwise call `next()`