proxy

package
v6.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2023 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ForwardedHeaders

func ForwardedHeaders(proxyCount int) func(http.Handler) http.Handler

ForwardedHeaders will parse the X-Forwarded-For and X-Forwarded-Proto headers and modify the request object accordingly.

Set the proxyCount to the number of known proxies so that any values set by the origin caller get ignored.

func GetRealIP

func GetRealIP(headersToCheck ...string) func(http.Handler) http.Handler

GetRealIP will take the first value which can be found in any of the given headers and then set the request's RemoteAddr with it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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