mirror of
https://github.com/zeromicro/go-zero.git
synced 2026-05-13 18:00:00 +08:00
feat: add option to ignore unknown fields in gateway request parsing (#5058)
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user