feat: header based acls (#337)

* feat: add header decoder

* feat: allow for dash substitute over slash for environments like kubernetes

* feat: use decoded headers in proxy controller

* refactor: simplify decode header to node function

* refactor: use stdlib prefix check in header decoder

* fix: lowercase key and filter before comparing
This commit is contained in:
Stavros
2025-09-02 19:06:52 +03:00
committed by GitHub
parent 9ce16c9652
commit f0d2da281a
10 changed files with 355 additions and 51 deletions

View File

@@ -46,6 +46,8 @@ func GetBasicAuth(username string, password string) string {
}
func FilterIP(filter string, ip string) (bool, error) {
filter = strings.Replace(filter, "-", "/", -1)
ipAddr := net.ParseIP(ip)
if strings.Contains(filter, "/") {