Skip to content

Commit

Permalink
docs: Emphasize required matcher change for `localePrefix: 'as-necess…
Browse files Browse the repository at this point in the history
…ary'`
  • Loading branch information
amannn committed Nov 22, 2024
1 parent c6370f0 commit 7f40c9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/src/pages/docs/routing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export const routing = defineRouting({
});
```

Additionally, you should adapt your middleware matcher to detect [unprefixed pathnames](/docs/routing/middleware#matcher-no-prefix) for this routing strategy to work as expected.
**Important**: For this routing strategy to work as expected, you should adapt your middleware matcher to detect [unprefixed pathnames](/docs/routing/middleware#matcher-no-prefix).

Note that if a superfluous locale prefix like `/en/about` is requested, the middleware will automatically redirect to the unprefixed version `/about`. This can be helpful in case you're redirecting from another locale and you want to update a potential cookie value first (e.g. [`<Link />`](/docs/routing/navigation#link) relies on this mechanism).

Expand Down

0 comments on commit 7f40c9c

Please sign in to comment.