[]previous and next page

Routing knobs: caseSensitive and trailingSlash (G-B3, G-B4)

Two routing options reach every server router, the browser router and the API routes.

For agentsUpdated

Two routing options reach every server router, the browser router and the API routes. They are not keys of dusk.config.ts:

  • router.caseSensitive is an option of the dusk() Vite plugin (default false). It decides whether /About and /about are the same route, at build time (the scanner) and at run time (the server matchers and the browser router). The build writes it into the server manifest and the client entry, so you set it once. See Case sensitivity.
  • trailingSlash is an option of createHandler, set in src/entry-server.ts (default "never"). It is "never", "always" or "preserve". It applies to pages and to API routes alike: a request for the other form is a 308 to the canonical one, except that "preserve" redirects nothing. See Trailing slashes on API routes.