Skip to content

Policies

Stoma’s power comes from its extensive library of built-in policies. Policies are named, prioritized Hono middleware handlers that you can compose into pipelines to handle every aspect of your API’s behavior.

Browse policies by category to find the right building blocks for your gateway.


Policies in a pipeline execute based on a numeric priority (lowest number first). This ensures that critical tasks like logging and authentication always happen before downstream transforms or proxying.

PriorityCategoryExamples
0ObservabilityrequestLog
10AuthenticationjwtAuth, apiKeyAuth
20Rate LimitingrateLimit
40Cachingcache
95Proxyproxy

Learn more about the Policy System