mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2025-10-28 20:55:42 +00:00
feat: allow for dash substitute over slash for environments like kubernetes
This commit is contained in:
@@ -46,6 +46,8 @@ func GetBasicAuth(username string, password string) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func FilterIP(filter string, ip string) (bool, error) {
|
func FilterIP(filter string, ip string) (bool, error) {
|
||||||
|
filter = strings.Replace(filter, "-", "/", -1)
|
||||||
|
|
||||||
ipAddr := net.ParseIP(ip)
|
ipAddr := net.ParseIP(ip)
|
||||||
|
|
||||||
if strings.Contains(filter, "/") {
|
if strings.Contains(filter, "/") {
|
||||||
|
|||||||
Reference in New Issue
Block a user