From d27fab750589b102aa21ada66b482148aeb6519e Mon Sep 17 00:00:00 2001 From: Zaid Marzguioui Date: Tue, 31 Mar 2026 22:49:35 +0200 Subject: [PATCH] fix: remove conflicting middleware.ts, proxy.ts already handles locale routing Next.js 16 uses proxy.ts instead of middleware.ts. The existing proxy.ts already includes next-intl locale routing + auth guards. CACHE_BUST=5. --- Dockerfile | 2 +- apps/web/middleware.ts | 15 --------------- 2 files changed, 1 insertion(+), 16 deletions(-) delete mode 100644 apps/web/middleware.ts diff --git a/Dockerfile b/Dockerfile index 7eb92fcc9..a8997ef83 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ WORKDIR /app # --- Install + Build in one stage --- FROM base AS builder -ARG CACHE_BUST=4 +ARG CACHE_BUST=5 COPY . . RUN pnpm install --no-frozen-lockfile ENV NEXT_TELEMETRY_DISABLED=1 diff --git a/apps/web/middleware.ts b/apps/web/middleware.ts deleted file mode 100644 index 1e1fff1de..000000000 --- a/apps/web/middleware.ts +++ /dev/null @@ -1,15 +0,0 @@ -import createMiddleware from 'next-intl/middleware'; - -import { routing } from '@kit/i18n/routing'; - -export default createMiddleware(routing); - -export const config = { - matcher: [ - // Match all pathnames except: - // - API routes (/api/...) - // - Next.js internals (/_next/...) - // - Static files with extensions - '/((?!api|_next|.*\\..*).*)', - ], -};