diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 7037998ac1bd6..0d843abbca8a0 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -15,7 +15,7 @@ pnpm-lock.yaml @nodejs/web-infra # Framework apps/site/next.config.mjs @nodejs/web-infra apps/site/next.dynamic.mjs @nodejs/web-infra -apps/site/middleware.ts @nodejs/web-infra +apps/site/proxy.ts @nodejs/web-infra apps/site/navigation.mjs @nodejs/web-infra apps/site/playwright.config.ts @nodejs/web-infra diff --git a/apps/site/middleware.ts b/apps/site/proxy.ts similarity index 86% rename from apps/site/middleware.ts rename to apps/site/proxy.ts index 58c3ded5d1d70..8780a316d6214 100644 --- a/apps/site/middleware.ts +++ b/apps/site/proxy.ts @@ -2,7 +2,7 @@ import createMiddleware from 'next-intl/middleware'; import { availableLocaleCodes, defaultLocale } from '#site/next.locales.mjs'; -export default createMiddleware({ +export const proxy = createMiddleware({ // A list of all locales that are supported locales: availableLocaleCodes, @@ -17,6 +17,6 @@ export default createMiddleware({ alternateLinks: false, }); -// We only want the middleware to run on the `/` route +// We only want the proxy to run on the `/` route // to redirect users to their preferred locale export const config = { matcher: ['/'] };