mirror of
https://github.com/alibaba/higress.git
synced 2026-06-09 20:57:32 +08:00
Enhance the compatibility of wasm-go sdk for route matching (#205)
This commit is contained in:
@@ -20,6 +20,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/tetratelabs/proxy-wasm-go-sdk/proxywasm"
|
"github.com/tetratelabs/proxy-wasm-go-sdk/proxywasm"
|
||||||
|
"github.com/tetratelabs/proxy-wasm-go-sdk/proxywasm/types"
|
||||||
"github.com/tidwall/gjson"
|
"github.com/tidwall/gjson"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -68,7 +69,7 @@ func (m RuleMatcher[PluginConfig]) GetMatchConfig() (*PluginConfig, error) {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
routeName, err := proxywasm.GetProperty([]string{"route_name"})
|
routeName, err := proxywasm.GetProperty([]string{"route_name"})
|
||||||
if err != nil {
|
if err != nil && err != types.ErrorStatusNotFound {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
for _, rule := range m.ruleConfig {
|
for _, rule := range m.ruleConfig {
|
||||||
|
|||||||
Reference in New Issue
Block a user