diff options
Diffstat (limited to 'plugins/http/config/http.go')
-rw-r--r-- | plugins/http/config/http.go | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/plugins/http/config/http.go b/plugins/http/config/http.go index bd689918..a8b1e8e3 100644 --- a/plugins/http/config/http.go +++ b/plugins/http/config/http.go @@ -146,26 +146,6 @@ func ParseCIDRs(subnets []string) (Cidrs, error) { return c, nil } -// IsTrusted if api can be trusted to use X-Real-Ip, X-Forwarded-For -func (c *HTTP) IsTrusted(ip string) bool { - if c.Cidrs == nil { - return false - } - - i := net.ParseIP(ip) - if i == nil { - return false - } - - for _, cird := range c.Cidrs { - if cird.Contains(i) { - return true - } - } - - return false -} - // Valid validates the configuration. func (c *HTTP) Valid() error { const op = errors.Op("validation") |