Expand description
§Default Handlers
This module provides standard implementations for common gateway hooks, offering sane defaults that cover most use cases.
§Components
default_error_handler: Returns simple JSON error responses.default_metadata_annotator: Injects standard metadata like Request ID and Client IP.default_response_modifier: Honors thex-http-codeheader for status code overrides.default_incoming_header_matcher: FiltersAuthorization,x-request-id(security) and renamesRefresh.default_outgoing_header_matcher: Lowercases all headers.default_auth_verifier: Basic API Key presence check.
Functions§
- default_
auth_ verifier - A default authentication verifier.
- default_
error_ handler - A custom HTTP error handler that returns JSON error responses.
- default_
incoming_ header_ matcher - An incoming header matcher that filters specific headers.
- default_
metadata_ annotator - A metadata annotator that injects request context information.
- default_
outgoing_ header_ matcher - An outgoing header matcher that passes through all headers lowercased.
- default_
response_ modifier - A response modifier that sets the HTTP status code based on the
x-http-codeheader.