grpc_http1_bridge: support for prepending and trimming the grpc frame header (#19331)

This is an implementation based on the discussion in #19198.

When application/x-protobuf is used the filter will prepend the payload with the gRPC header, as defined by the wire format. Before returning the response the frame is also trimmed. This functionality is behind a configuration setting.

Risk Level: Medium
Testing: Unit tests
Docs Changes: Added
Fixes #19198

Signed-off-by: Stefan Puhlmann <stefanp@spotify.com>

Mirrored from https://github.com/envoyproxy/envoy @ 8feaee6e5801bdbe0837158e5fc499a723b1a108
pull/626/head
data-plane-api(Azure Pipelines) 3 years ago
parent d10a1fe818
commit 034b42dbe6
  1. 7
      envoy/extensions/filters/http/grpc_http1_bridge/v3/config.proto

@ -19,4 +19,11 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE;
message Config {
option (udpa.annotations.versioning).previous_message_type =
"envoy.config.filter.http.grpc_http1_bridge.v2.Config";
// If true then requests with content type set to `application/x-protobuf` will be automatically converted to gRPC.
// This works by prepending the payload data with the gRPC header frame, as defined by the wiring format, and
// Content-Type will be updated accordingly before sending the request.
// For the requests that went through this upgrade the filter will also strip the frame before forwarding the
// response to the client.
bool upgrade_protobuf_to_grpc = 1;
}

Loading…
Cancel
Save