feat: ext-auth plugin: Blacklist and whitelist modes support HTTP request method matching (#1798)

This commit is contained in:
韩贤涛
2025-02-26 20:54:52 +08:00
committed by GitHub
parent 2d8a8f26da
commit 90ca903d2e
8 changed files with 311 additions and 132 deletions

View File

@@ -37,3 +37,12 @@ func ExtractFromHeader(headers [][2]string, headerKey string) string {
}
return ""
}
func ContainsString(slice []string, s string) bool {
for _, item := range slice {
if strings.EqualFold(item, s) {
return true
}
}
return false
}