/Knowledge/sources/honojs__hono/llms-full/combine-middleware-usage-except--541ab3acf47e.md
Combine Middleware: Usage > except - hono-docs
Combine Middleware: Usage except Source evidence: /Sources/honojs hono/provenance.md Canonical citation: https://hono.dev/llms full.txt except Summary Runs a...
Combine Middleware: Usage > except
Source evidence: /Sources/honojs__hono/provenance.md Canonical citation: https://hono.dev/llms-full.txt#except
Summary
Runs all middleware except when the condition is met. You can pass a string or function as the condition. If multiple targets need to be matched, pass them as an array. ```ts import { except } from 'hono/combine' import { bearerAuth } fr...
Content
Runs all middleware except when the condition is met. You can pass a string or function as the condition. If multiple targets need to be matched, pass them as an array.
import { except } from 'hono/combine'
import { bearerAuth } from 'hono/bearer-auth'
// If client is accessing public API, skip authentication.
// Otherwise, require a valid token.
app.use('/api/*', except('/api/public/*', bearerAuth({ token })))
Metadata
{
"chunk_index": 0,
"citation": "https://hono.dev/llms-full.txt#except",
"coverage_role": "overview",
"qualified_title": "Hono / llms-full / Combine Middleware > Usage > except",
"retrieved_at": "2026-07-02T05:51:01Z",
"section_index": 273,
"source_id": "/honojs/hono",
"source_type": "llms_full",
"target_label": "llms-full",
"title": "Combine Middleware: Usage > except",
"upstream_url": "https://hono.dev/llms-full.txt",
"version": "2026"
}