Migration to kubernetes + vault-agent
This commit is contained in:
@@ -50,9 +50,13 @@ func InitAllowedIPList(l string) []netip.Prefix {
|
||||
}
|
||||
|
||||
// IPAllowed check if the IP is authorized to do BAN/PURGE requests
|
||||
func IPAllowed(ip netip.Addr) bool {
|
||||
func IPAllowed(ip string) bool {
|
||||
ipAddr, err := netip.ParseAddr(ip)
|
||||
if err != nil {
|
||||
log.Printf("Ip address wrong format %s", err)
|
||||
}
|
||||
for i := 0; i < len(ClientList); i++ {
|
||||
if ClientList[i].Contains(ip) {
|
||||
if ClientList[i].Contains(ipAddr) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user