Skip to content

Commit b27a2af

Browse files
authored
Merge pull request #2 from sailor/patch-1
Fix x-forwarded-for header calculation
2 parents 81f50fb + 579e1cb commit b27a2af

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

reverse.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ func addXForwardedForHeader(req *http.Request) {
215215
// X-Forwarded-For information as a comma+space
216216
// separated list and fold multiple headers into one.
217217
if prior, ok := req.Header["X-Forwarded-For"]; ok {
218-
clientIP = strings.Join(prior, ", ") + clientIP
218+
clientIP = strings.Join(prior, ", ") + ", " + clientIP
219219
}
220220
req.Header.Set("X-Forwarded-For", clientIP)
221221
}

0 commit comments

Comments
 (0)