Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/hono/middleware/trailing-slash/index.ts

Web Framework built on Web Standards
Very Popular
Go to Latest
import * as hono from "https://deno.land/x/hono@v4.2.8/middleware/trailing-slash/index.ts";

Variables

Append a trailing slash to the URL if it doesn't have one. For example, /path/to/page will be redirected to /path/to/page/.

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