Documentation
¶
Overview ¶
Package middleware provides HTTP middleware components for the CLI Proxy API server. This file contains the request logging middleware that captures comprehensive request and response data when enabled through configuration.
Package middleware provides Gin HTTP middleware for the CLI Proxy API server. It includes a sophisticated response writer wrapper designed to capture and log request and response data, including support for streaming responses, without impacting latency.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RequestLoggingMiddleware ¶
func RequestLoggingMiddleware(logger logging.RequestLogger) gin.HandlerFunc
RequestLoggingMiddleware creates a Gin middleware that logs HTTP requests and responses. It captures detailed information about the request and response, including headers and body, and uses the provided RequestLogger to record this data. When full request logging is disabled, body capture is limited to small known-size payloads to avoid large per-request memory spikes.
Types ¶
This section is empty.