Skip to main content

All middlewares

Every middleware type Miabi curates. Each has a form in the console, validation on save, and encryption for any field holding a credential. See Using middlewares for how to attach them to a route and why the order matters.

Access

MiddlewareTypeWhat it does
Basic authenticationbasicAuthRequire a username and password (HTTP Basic) to reach the route.
JWT authenticationjwtAuthRequire a valid JSON Web Token. Verify with a shared secret (HS*), a public key, or a JWKS endpoint.
OpenID Connect (SSO)oidcSign users in at the gateway against an identity provider, and pass who they are to the app.
Forward authenticationforwardAuthDelegate authentication to an external service, like Authelia or oauth2-proxy.
LDAP authenticationldapAuthAuthenticate users against an LDAP / Active Directory directory.

Security

MiddlewareTypeWhat it does
Block accessaccessDeny requests to the matched paths with a fixed status code.
IP access policyaccessPolicyAllow or deny requests by client IP / CIDR range.
Request body limitbodyLimitReject requests whose body exceeds a size limit.
Block user agentsuserAgentBlockReject requests whose User-Agent matches any of the listed patterns.
Country access policy (GeoIP)geoBlockAllow or deny requests by client country (GeoIP), with optional country-header enrichment for the backend.

Traffic

MiddlewareTypeWhat it does
Rate limitrateLimitThrottle requests per client over a time unit.
HTTP cachehttpCacheCache responses at the gateway so repeat requests never reach the app.

Transform

MiddlewareTypeWhat it does
Force scheme (HTTPS)redirectSchemeRedirect requests to a different scheme — typically http→https.
RedirectredirectRedirect every matched request to a fixed URL.
Redirect (regex)redirectRegexRedirect using a regular-expression match on the request path.
Rewrite path (regex)rewriteRegexRewrite the request path with a regular expression before it reaches the app.
Add path prefixaddPrefixPrepend a path prefix before forwarding the request to the app.
Request headersrequestHeadersAdd, override or remove headers before the request reaches the app.
Response headersresponseHeadersAdd, override or remove headers on the response, and set CORS or cookies.

Observability

MiddlewareTypeWhat it does
Error interceptorerrorInterceptorReplace upstream error responses with a custom body or template.
Uncatalogued types

A middleware type Miabi does not curate can still be used: the rule is passed to the gateway as written. It gets no form, no validation and no encryption of its fields, so a credential in one is stored in the clear. Prefer a curated type where one exists.