Skip to main content
Deno 2 is finally here 🎉️
Learn more
Very Popular
Go to Latest
variable trimTrailingSlash
import { trimTrailingSlash } from "https://deno.land/x/hono@v4.2.1/middleware/trailing-slash/index.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())