Skip to content

Commit

Permalink
refactor(): remove cf-connecting-ip from default headers
Browse files Browse the repository at this point in the history
  • Loading branch information
n33pm committed Apr 9, 2024
1 parent cb43924 commit da49574
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions middleware/realip.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@ import (
)

var DefaultRealIPHeaders = []string{
"CF-Connecting-IP", // Cloudflare free plan
"True-Client-IP", // Cloudflare Enterprise plan
"X-Real-IP",
"X-Forwarded-For",
}

// RealIP is a middleware that sets a http.Request's RemoteAddr to the results
// of parsing either the CF-Connecting-IP, True-Client-IP, X-Real-IP or the X-Forwarded-For headers
// of parsing either the True-Client-IP, X-Real-IP or the X-Forwarded-For headers
// (in that order).
//
// This middleware should be inserted fairly early in the middleware stack to
Expand Down

0 comments on commit da49574

Please sign in to comment.