Commit c8a99d2f authored by Matthew Holt's avatar Matthew Holt

Don't use X-Forwarded-For for {remote} placeholder (closes #1025)

parent 68be4a91
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment