From 53b54e4c530fd304c87260c99f0ca4bec130ce65 Mon Sep 17 00:00:00 2001 From: "data-plane-api(CircleCI)" Date: Fri, 26 Jul 2019 01:33:46 +0000 Subject: [PATCH] grpc-json: add support for ignoring unknown query parameters (#7691) * grpc-json: add support for ignoring unknown query parameters Current behavior is not to transcode a request that contains a query parameter that cannot be mapped. In cases where there is a specific set of parameters to ignore one can use ignored_query_parameters. If there is a proxy or client adding query parameters that one cannot control this won't work and the transcoder becomes useless. ignore_unknown_query_parameters solves this problem. Risk Level: low to medium Testing: Added a unit test for the transcoder. Tested manually, locally. Docs Changes: Added field description in api/envoy/config/filter/http/transcoder/v2/transcoder.proto Release Notes: Signed-off-by: Neri Marschik Mirrored from https://github.com/envoyproxy/envoy @ 6af53be976c79a2b51a3f55825b722b58686c8a0 --- envoy/config/filter/http/transcoder/v2/transcoder.proto | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/envoy/config/filter/http/transcoder/v2/transcoder.proto b/envoy/config/filter/http/transcoder/v2/transcoder.proto index a7f092d3..14f54124 100644 --- a/envoy/config/filter/http/transcoder/v2/transcoder.proto +++ b/envoy/config/filter/http/transcoder/v2/transcoder.proto @@ -114,4 +114,10 @@ message GrpcJsonTranscoder { // The client could ``post`` a json body ``{"shelf": 1234}`` with the path of // ``/bookstore.Bookstore/GetShelfRequest`` to call ``GetShelfRequest``. bool auto_mapping = 7; + + // Whether to ignore query parameters that cannot be mapped to a corresponding + // protobuf field. Use this if you cannot control the query parameters and do + // not know them beforehand. Otherwise use ``ignored_query_parameters``. + // Defaults to false. + bool ignore_unknown_query_parameters = 8; }