proxy

package
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package proxy wraps and configures an HTTP reverse proxy to forward requests to the configured upstream target.

Index

Constants

View Source
const (
	HeaderForwardedHost  = "X-Forwarded-Host"
	HeaderForwardedFor   = "X-Forwarded-For"
	HeaderForwardedProto = "X-Forwarded-Proto"
)

Variables

This section is empty.

Functions

func New

func New(target *url.URL) http.Handler

New constructs a reverse proxy handler that forwards requests to the target address. It applies sane defaults for CouchDB, strips sensitive headers, and enriches forwarding headers (X-Forwarded-*). Upstream errors are mapped to 502/504 as appropriate; client cancellations are silently ignored.

Types

This section is empty.

Jump to

Keyboard shortcuts

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