Module

x/oak/router.ts>RouterOptions

A middleware framework for handling HTTP with Deno, Node, Bun and Cloudflare Workers 🐿️ 🦕
Very Popular
Latest
interface RouterOptions
import { type RouterOptions } from "https://dotland.deno.dev/x/oak@v17.1.2/router.ts";

Options which can be specified when creating a new instance of a Router.

Properties

optional
methods: HTTPMethods[]

Override the default set of methods supported by the router.

optional
prefix: string

Only handle routes where the requested path starts with the prefix.

optional
routerPath: string

Override the request.url.pathname when matching middleware to run.

optional
sensitive: boolean

Determines if routes are matched in a case sensitive way. Defaults to false.

optional
strict: boolean

Determines if routes are matched strictly, where the trailing / is not optional. Defaults to false.