mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2025-10-27 20:25:41 +00:00
feat: allow for dash substitute in ip filters for environments like kubernetes
This commit is contained in:
@@ -73,6 +73,8 @@ func CheckFilter(filter string, str string) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
filter = strings.Replace(filter, "-", "/", -1)
|
||||
|
||||
if strings.HasPrefix(filter, "/") && strings.HasSuffix(filter, "/") {
|
||||
re, err := regexp.Compile(filter[1 : len(filter)-1])
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user