feat: add option to ignore unknown fields in gateway request parsing (#5058)

This commit is contained in:
guonaihong
2025-08-09 12:40:07 +08:00
committed by GitHub
parent 9fd1f29845
commit 00e67b9d20
4 changed files with 165 additions and 29 deletions

View File

@@ -10,6 +10,10 @@ type (
GatewayConf struct {
rest.RestConf
Upstreams []Upstream
// IgnoreUnknownFields specifies whether to ignore unknown fields during proto unmarshaling.
// When set to true, extra query parameters or JSON fields that don't exist in the gRPC message
// will be ignored instead of causing an error.
IgnoreUnknownFields bool `json:",default=false"`
}
// HttpClientConf is the configuration for an HTTP client.