Skip to content

Policy

Defined in: src/policies/types.ts:21

A Policy is a named Hono middleware with metadata. Policies are the building blocks of gateway pipelines.

handler: MiddlewareHandler

Defined in: src/policies/types.ts:25

The Hono middleware handler


name: string

Defined in: src/policies/types.ts:23

Unique policy name (e.g. “jwt-auth”, “rate-limit”)


optional priority: number

Defined in: src/policies/types.ts:27

Policy priority — lower numbers execute first. Default: 100.