feat: Add ext-auth plugin support for authentication blacklists/whitelists (#1694)

This commit is contained in:
韩贤涛
2025-01-21 14:28:49 +08:00
committed by GitHub
parent cfa3baddf8
commit 0259eaddbb
14 changed files with 1126 additions and 425 deletions

View File

@@ -15,6 +15,7 @@
package wrapper
import (
"net/url"
"strconv"
"strings"
@@ -48,6 +49,15 @@ func GetRequestPath() string {
return path
}
func GetRequestPathWithoutQuery() (string, error) {
rawPath := GetRequestPath()
path, err := url.Parse(rawPath)
if err != nil {
return "", err
}
return path.Path, nil
}
func GetRequestMethod() string {
method, err := proxywasm.GetHttpRequestHeader(":method")
if err != nil {