Documentation ¶
Overview ¶
Package middleflare is a Traefik plugin that maps Cloudflare headers to standard headers.
Index ¶
Constants ¶
View Source
const ( XRealIP = "X-Real-IP" XForwardedFor = "X-Forwarded-For" XForwardedProto = "X-Forwarded-Proto" XForwardedHost = "X-Forwarded-Host" XTrustedProxy = "X-Trusted-Proxy" CFConnectingIP = "CF-Connecting-IP" CFVisitor = "CF-Visitor" )
Header name constants.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CFHeaderWriter ¶
type CFHeaderWriter struct {
// contains filtered or unexported fields
}
CFHeaderWriter is a plugin that maps CF-Connecting-IP to X-Real-IP and X-Forwarded-For.
func (*CFHeaderWriter) ServeHTTP ¶
func (writer *CFHeaderWriter) ServeHTTP(rw http.ResponseWriter, req *http.Request)
ServeHTTP implements the http.Handler interface.
type CheckResult ¶
CheckResult is the return from an IP trust check.
Directories ¶
Path | Synopsis |
---|---|
Package cfaddrs provides a list of Cloudflare's IP addresses, a function to check if an IP address is in a list of netip.Prefix, and a function to parse a list of CIDR strings into a list of netip.Prefix.
|
Package cfaddrs provides a list of Cloudflare's IP addresses, a function to check if an IP address is in a list of netip.Prefix, and a function to parse a list of CIDR strings into a list of netip.Prefix. |
Click to show internal directories.
Click to hide internal directories.