mirror of
https://github.com/alibaba/higress.git
synced 2026-03-16 08:20:45 +08:00
feat: Add ext-auth plugin support for authentication blacklists/whitelists (#1694)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user