/Knowledge/sources/honojs__hono/llms-full/trailing-slash-middleware-options-skip-path-string-boolean--0fb7b7b77923.md
Trailing Slash Middleware: Options > skip: (path: string) => boolean...
Trailing Slash Middleware: Options skip: (path: string) = boolean Source evidence: /Sources/honojs hono/provenance.md Canonical citation: https://hono.dev/ll...
Trailing Slash Middleware: Options > skip: (path: string) => boolean
Source evidence: /Sources/honojs__hono/provenance.md Canonical citation: https://hono.dev/llms-full.txt#skip-path-string-boolean
Summary
A function that determines whether the redirect should be skipped based on the request path. If the function returns true, the redirect will be skipped. This is useful when you want to exclude certain paths, such as those with file ext...
Content
A function that determines whether the redirect should be skipped based on the request path. If the function returns true, the redirect will be skipped. This is useful when you want to exclude certain paths, such as those with file extensions, from being redirected.
app.use(
appendTrailingSlash({
skip: (path) => /\.\w+$/.test(path),
})
)
This option is available for both trimTrailingSlash and appendTrailingSlash.
Metadata
{
"chunk_index": 0,
"citation": "https://hono.dev/llms-full.txt#skip-path-string-boolean",
"coverage_role": "overview",
"qualified_title": "Hono / llms-full / Trailing Slash Middleware > Options > skip: `(path: string) => boolean`",
"retrieved_at": "2026-07-02T05:51:01Z",
"section_index": 305,
"source_id": "/honojs/hono",
"source_type": "llms_full",
"target_label": "llms-full",
"title": "Trailing Slash Middleware: Options > skip: (path: string) => boolean",
"upstream_url": "https://hono.dev/llms-full.txt",
"version": "2026"
}