diff options
author | Anton Titov <[email protected]> | 2019-09-06 12:49:45 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2019-09-06 12:49:45 +0300 |
commit | 832295948b275898ec398341bba76ed96cbde5d9 (patch) | |
tree | 62f809be5c4fba1f3b5511832ec17d8de54937a8 /service/http/config.go | |
parent | 756a5a21cb4324c51ef44bd668c1c2f222aaa9b5 (diff) | |
parent | def26e1c757815bee024c1181ea1bb66c399156b (diff) |
Merge pull request #184 from spudro228/bug-fix/183-wrong-proxy-resolving
Bug fix/183 wrong proxy resolving
Diffstat (limited to 'service/http/config.go')
-rw-r--r-- | service/http/config.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/service/http/config.go b/service/http/config.go index ff15e83e..25be205c 100644 --- a/service/http/config.go +++ b/service/http/config.go @@ -189,6 +189,14 @@ func (c *Config) IsTrusted(ip string) bool { return false } +func (c *Config) IsValid(ip string) bool { + i := net.ParseIP(ip) + if i == nil { + return false + } + return true +} + // Valid validates the configuration. func (c *Config) Valid() error { if c.Uploads == nil { |