Skip to main content

Module defaults

Module defaults 

Source
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 the x-http-code header for status code overrides.
  • default_incoming_header_matcher: Filters Authorization, x-request-id (security) and renames Refresh.
  • 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-code header.