mirror of
https://github.com/caddyserver/caddy.git
synced 2024-11-25 17:56:34 +08:00
Merge branch 'master' into log-request-body
This commit is contained in:
commit
ac0dd303be
|
@ -87,9 +87,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 New Issue
Block a user