diff --git a/docs/pages/docs/routing/middleware.mdx b/docs/pages/docs/routing/middleware.mdx index 1eb3988de..f85ce8b5d 100644 --- a/docs/pages/docs/routing/middleware.mdx +++ b/docs/pages/docs/routing/middleware.mdx @@ -182,7 +182,7 @@ In this case, requests where the locale prefix matches the default locale will b #### Never use a locale prefix [#locale-prefix-never] -For applications behind an authentication layer, where there is no need for SEO, it is possible to have the locale never show up in the URL. +If you're building an app behind an authentication layer, where there is no need for SEO, or you're using [domain-based routing](#domain-based-routing) and you have distinct domains per locale, you can configure the middleware to never show a locale prefix in the URL. ```tsx filename="middleware.ts" {6} import createMiddleware from 'next-intl/middleware'; @@ -448,8 +448,8 @@ export default async function middleware(req: NextRequest) { }); const res = handleI18nRouting(req); - const supabase = createMiddlewareClient({ req, res }) - await supabase.auth.getSession() + const supabase = createMiddlewareClient({req, res}); + await supabase.auth.getSession(); return res; }