filter: add language http filter "accept-language" (#20143)

* filter: add language http filter "accept-language"

Signed-off-by: ye1kiev4wohgho9s <a1ma5quahdial9hx@protonmail.com>

Mirrored from https://github.com/envoyproxy/envoy @ 383ac2b4849bd2dac1ed330753dbecc2ad61e2d0
pull/626/head
data-plane-api(Azure Pipelines) 3 years ago
parent a295d8d622
commit c6a39e0e25
  1. 1
      BUILD
  2. 9
      contrib/envoy/extensions/filters/http/language/v3alpha/BUILD
  3. 36
      contrib/envoy/extensions/filters/http/language/v3alpha/language.proto
  4. 1
      versioning/BUILD

@ -72,6 +72,7 @@ proto_library(
name = "v3_protos",
visibility = ["//visibility:public"],
deps = [
"//contrib/envoy/extensions/filters/http/language/v3alpha:pkg",
"//contrib/envoy/extensions/filters/http/squash/v3:pkg",
"//contrib/envoy/extensions/filters/http/sxg/v3alpha:pkg",
"//contrib/envoy/extensions/filters/network/kafka_broker/v3:pkg",

@ -0,0 +1,9 @@
# DO NOT EDIT. This file is generated by tools/proto_format/proto_sync.py.
load("@envoy_api//bazel:api_build_system.bzl", "api_proto_package")
licenses(["notice"]) # Apache 2
api_proto_package(
deps = ["@com_github_cncf_udpa//udpa/annotations:pkg"],
)

@ -0,0 +1,36 @@
syntax = "proto3";
package envoy.extensions.filters.http.language.v3alpha;
import "udpa/annotations/status.proto";
import "validate/validate.proto";
option java_package = "io.envoyproxy.envoy.extensions.filters.http.language.v3alpha";
option java_outer_classname = "LanguageProto";
option java_multiple_files = true;
option go_package = "github.com/envoyproxy/go-control-plane/envoy/extensions/filters/http/language/v3alpha";
option (udpa.annotations.file_status).package_version_status = ACTIVE;
// [#protodoc-title: Language]
// Language :ref:`configuration overview <config_http_filters_language>`.
// [#extension: envoy.filters.http.language]
// Language detection filter config.
message Language {
// The default language to be used as a fallback.
// The value will be included in the list of the supported languages.
//
// See https://unicode-org.github.io/icu/userguide/locale/
string default_language = 1 [(validate.rules).string = {min_len: 2}];
// The set of supported languages. There is no order priority.
// The order will be determined by the Accept-Language header priority list
// of the client.
//
// See https://unicode-org.github.io/icu/userguide/locale/
repeated string supported_languages = 2 [(validate.rules).repeated = {
min_items: 1
unique: true
items {string {min_len: 2}}
}];
}

@ -9,6 +9,7 @@ proto_library(
name = "active_protos",
visibility = ["//visibility:public"],
deps = [
"//contrib/envoy/extensions/filters/http/language/v3alpha:pkg",
"//contrib/envoy/extensions/filters/http/squash/v3:pkg",
"//contrib/envoy/extensions/filters/http/sxg/v3alpha:pkg",
"//contrib/envoy/extensions/filters/network/kafka_broker/v3:pkg",

Loading…
Cancel
Save