File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
plugins/wasm-go/extensions/ai-cache/cache Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package cache
2
2
3
3
import (
4
4
"errors"
5
+ "strings"
5
6
6
7
"github.com/alibaba/higress/plugins/wasm-go/pkg/wrapper"
7
8
"github.com/tidwall/gjson"
@@ -62,7 +63,12 @@ func (c *ProviderConfig) FromJson(json gjson.Result) {
62
63
c .serviceName = json .Get ("serviceName" ).String ()
63
64
c .servicePort = int (json .Get ("servicePort" ).Int ())
64
65
if ! json .Get ("servicePort" ).Exists () {
65
- c .servicePort = 6379
66
+ if strings .HasSuffix (c .serviceName , ".static" ) {
67
+ // use default logic port which is 80 for static service
68
+ c .servicePort = 80
69
+ } else {
70
+ c .servicePort = 6379
71
+ }
66
72
}
67
73
c .serviceHost = json .Get ("serviceHost" ).String ()
68
74
c .username = json .Get ("username" ).String ()
You can’t perform that action at this time.
0 commit comments