Module

x/hono/middleware.ts>trimTrailingSlash

Fast, Lightweight, Web-standards
Extremely Popular
Go to Latest
variable trimTrailingSlash
import { trimTrailingSlash } from "https://dotland.deno.dev/x/hono@v4.2.5/middleware.ts";

Trim the trailing slash from the URL if it does have one. For example, /path/to/page/ will be redirected to /path/to/page.

Examples

app.use(trimTrailingSlash())