Skip to content

Commit

Permalink
allow unknown fields in configs (envoyproxy#2734)
Browse files Browse the repository at this point in the history
Signed-off-by: Kuat Yessenov <[email protected]>
  • Loading branch information
kyessenov authored Feb 28, 2020
1 parent 0137560 commit 71b7a6c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions extensions/access_log_policy/plugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ bool PluginRootContext::onConfigure(size_t) {
}
WasmDataPtr configuration = getConfiguration();
JsonParseOptions json_options;
json_options.ignore_unknown_fields = true;
Status status =
JsonStringToMessage(configuration->toString(), &config_, json_options);
if (status != Status::OK) {
Expand Down
1 change: 1 addition & 0 deletions extensions/stackdriver/stackdriver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ bool StackdriverRootContext::onConfigure(size_t) {
// TODO: add config validation to reject the listener if project id is not in
// metadata. Parse configuration JSON string.
JsonParseOptions json_options;
json_options.ignore_unknown_fields = true;
Status status =
JsonStringToMessage(configuration->toString(), &config_, json_options);
if (status != Status::OK) {
Expand Down
1 change: 1 addition & 0 deletions extensions/stats/plugin.cc
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ bool PluginRootContext::onConfigure(size_t) {
std::unique_ptr<WasmData> configuration = getConfiguration();
// Parse configuration JSON string.
JsonParseOptions json_options;
json_options.ignore_unknown_fields = true;
Status status =
JsonStringToMessage(configuration->toString(), &config_, json_options);
if (status != Status::OK) {
Expand Down

0 comments on commit 71b7a6c

Please sign in to comment.