mirror of
https://github.com/caddyserver/caddy.git
synced 2025-01-13 22:51:08 -05:00
Don't use X-Forwarded-For for {remote} placeholder (closes #1025)
This commit is contained in:
parent
68be4a9161
commit
c8a99d2f81
1 changed files with 0 additions and 3 deletions
|
@ -84,9 +84,6 @@ func NewReplacer(r *http.Request, rr *ResponseRecorder, emptyValue string) Repla
|
|||
"{fragment}": func() string { return r.URL.Fragment },
|
||||
"{proto}": func() string { return r.Proto },
|
||||
"{remote}": func() string {
|
||||
if fwdFor := r.Header.Get("X-Forwarded-For"); fwdFor != "" {
|
||||
return fwdFor
|
||||
}
|
||||
host, _, err := net.SplitHostPort(r.RemoteAddr)
|
||||
if err != nil {
|
||||
return r.RemoteAddr
|
||||
|
|
Loading…
Reference in a new issue