// Copyright 2025 Envoy Project Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// 
//     http://www.apache.org/licenses/LICENSE-2.0
// 
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package envoy.extensions.filters.http.grpc_http1_bridge.v3;

import "udpa/annotations/status.proto";
import "udpa/annotations/versioning.proto";

option java_package = "io.envoyproxy.envoy.extensions.filters.http.grpc_http1_bridge.v3";
option java_outer_classname = "ConfigProto";
option java_multiple_files = true;
option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/grpc_http1_bridge/v3;grpc_http1_bridgev3";
option (udpa.annotations.file_status).package_version_status = ACTIVE;

// [#protodoc-title: gRPC HTTP/1.1 Bridge]
// gRPC HTTP/1.1 Bridge Filter :ref:`configuration overview <config_http_filters_grpc_bridge>`.
// [#extension: envoy.filters.http.grpc_http1_bridge]

// gRPC HTTP/1.1 Bridge filter config.
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;

  // If true then query parameters in request's URL path will be removed.
  bool ignore_query_parameters = 2;
}
