httpmw

package
v0.9.22 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2026 License: Apache-2.0 Imports: 2 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const DefaultMaxRequestBytes int64 = 32 * 1024 * 1024

DefaultMaxRequestBytes matches Anthropic's documented /v1/messages limit (32 MB). OpenAI/Gemini limits are similar or higher; we standardize on this so relay never rejects a body the upstream would accept. Override with RELAY_MAX_REQUEST_BYTES.

Variables

This section is empty.

Functions

func IsBodyTooLargeError

func IsBodyTooLargeError(err error) bool

func LimitBody

func LimitBody(limit int64) func(http.Handler) http.Handler

Types

This section is empty.

Jump to

Keyboard shortcuts

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