Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 14, 05:15 UTC
caddyhttp: Document that remote_ip reads X-Forwarded-For header
https://caddy.community/t/remote-ip-behaviour/10762?u=matt
Matthew Holt committed
Dec 9, 2020 at 13:06 UTC
b8a799df9f58cf3ccc2577a37c2b561d2a3e72bd
1 file changed
+3
modules/caddyhttp/matchers.go
+3
@@ -105,6 +105,9 @@ type (
105
MatchProtocol string
106
107
// MatchRemoteIP matches requests by client IP (or CIDR range).
108
+ // If the X-Forwarded-For header is set, the first IP in that list
109
+ // is used as the reference IP; otherwise, the remote IP of the
110
+ // connection is the reference.
111
MatchRemoteIP struct {
112
Ranges []string `json:"ranges,omitempty"`
113