Skip to main content

Module route_handler

Module route_handler 

Source
Expand description

Pluggable route handler trait for pre-dispatch request interception.

Route handlers are checked in registration order before the main proxy dispatch. Each handler can inspect the request and optionally return a ProxyResult to short-circuit further processing. If no handler matches, the request proceeds to the normal resolve/dispatch pipeline.

This module also defines the action/result types shared between route handlers and the proxy gateway.

Structs§

ForwardRequest
A presigned URL request for the runtime to execute.
Params
Extracted path parameters from route matching.
PendingRequest
Opaque state for an operation that needs the request body before it can be completed (multipart operations and batch delete).
ProxyResult
The result of handling a proxy request.
RequestInfo
Parsed request metadata passed to route handlers.

Enums§

HandlerAction
The action the handler wants the runtime to take.
ProxyResponseBody
The body of a proxy response.

Constants§

RESPONSE_HEADER_DENYLIST
Response headers that must NOT be forwarded to clients.

Traits§

RouteHandler
A pluggable handler that can intercept requests before proxy dispatch.

Functions§

filter_response_headers
Filter a HeaderMap by removing headers in the RESPONSE_HEADER_DENYLIST.

Type Aliases§

RouteHandlerFuture
The future type returned by RouteHandler::handle.