mirror of
https://github.com/alibaba/higress.git
synced 2026-06-09 20:57:32 +08:00
support empty config with custom config func (#718)
This commit is contained in:
@@ -159,8 +159,7 @@ func (ctx *CommonPluginCtx[PluginConfig]) OnPluginStart(int) types.OnPluginStart
|
|||||||
var jsonData gjson.Result
|
var jsonData gjson.Result
|
||||||
if len(data) == 0 {
|
if len(data) == 0 {
|
||||||
if ctx.vm.hasCustomConfig {
|
if ctx.vm.hasCustomConfig {
|
||||||
ctx.vm.log.Warn("need config")
|
ctx.vm.log.Warn("config is empty, but has ParseConfigFunc")
|
||||||
return types.OnPluginStartStatusFailed
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if !gjson.ValidBytes(data) {
|
if !gjson.ValidBytes(data) {
|
||||||
|
|||||||
Reference in New Issue
Block a user