Module

x/hono/middleware.ts

Web Framework built on Web Standards
Extremely Popular
Go to Latest
import * as mod from "https://dotland.deno.dev/x/hono@v4.3.10/middleware.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/.

Body Limit Middleware

Method Override Middleware

Default headers to pass through on 304 responses. From the spec:

The response must not contain a body and must include the headers that would have been sent in an equivalent 200 OK response: Cache-Control, Content-Location, Date, ETag, Expires, and Vary.

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