Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions apps/site/middleware.ts → apps/site/proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,

Expand All @@ -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: ['/'] };