middleware

package
v6.10.9-aug.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2026 License: MIT Imports: 10 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL