summaryrefslogtreecommitdiff
path: root/plugins/http/config/http.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-01-25 13:10:06 +0300
committerValery Piashchynski <[email protected]>2021-01-25 13:10:06 +0300
commit2a0e7d37d825da6bb0538599ce0e2edaaa59403b (patch)
tree89c00a43333246bb6c6815c923548eecd7d4e717 /plugins/http/config/http.go
parentb18a3578b6d299aac5dfcc016c2a3a0f6905aa0d (diff)
resolve #415
Diffstat (limited to 'plugins/http/config/http.go')
-rw-r--r--plugins/http/config/http.go20
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")