Documentation ¶ Overview ¶ Package realip recovers the client address behind a reverse proxy. Index ¶ func Handler(trusted []netip.Prefix, next http.Handler) http.Handler func Parse(list []string) ([]netip.Prefix, error) Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Handler ¶ func Handler(trusted []netip.Prefix, next http.Handler) http.Handler Handler sets r.RemoteAddr to the client a trusted proxy reports: the rightmost X-Forwarded-For entry that is not itself a trusted proxy. Requests from anyone else keep their address; their header is ignored. func Parse ¶ func Parse(list []string) ([]netip.Prefix, error) Parse reads comma-separated addresses or prefixes: "10.0.0.0/8, 172.18.0.2". Types ¶ This section is empty. Source Files ¶ View all Source files realip.go Click to show internal directories. Click to hide internal directories.