mirror of
https://github.com/adnanh/webhook.git
synced 2025-05-23 05:42:30 +00:00
Use strings.Contains
This commit is contained in:
parent
8d260c6a7e
commit
7da4d8ba9f
1 changed files with 1 additions and 1 deletions
|
@ -196,7 +196,7 @@ func CheckIPWhitelist(remoteAddr string, ipRange string) (bool, error) {
|
||||||
|
|
||||||
ipRange = strings.TrimSpace(ipRange)
|
ipRange = strings.TrimSpace(ipRange)
|
||||||
|
|
||||||
if strings.Index(ipRange, "/") == -1 {
|
if !strings.Contains(ipRange, "/") {
|
||||||
ipRange = ipRange + "/32"
|
ipRange = ipRange + "/32"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue