• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1syntax = "proto3";
2
3package envoy.type.http.v3;
4
5import "udpa/annotations/status.proto";
6import "validate/validate.proto";
7
8option java_package = "io.envoyproxy.envoy.type.http.v3";
9option java_outer_classname = "PathTransformationProto";
10option java_multiple_files = true;
11option go_package = "github.com/envoyproxy/go-control-plane/envoy/type/http/v3;httpv3";
12option (udpa.annotations.file_status).package_version_status = ACTIVE;
13
14// [#protodoc-title: Path Transformations API]
15
16// PathTransformation defines an API to apply a sequence of operations that can be used to alter
17// text before it is used for matching or routing. Multiple actions can be applied in the same
18// Transformation, forming a sequential pipeline. The transformations will be performed in the order
19// that they appear.
20//
21// This API is a work in progress.
22
23message PathTransformation {
24  // A type of operation to alter text.
25  message Operation {
26    // Should text be normalized according to RFC 3986? This typically is used for path headers
27    // before any processing of requests by HTTP filters or routing. This applies percent-encoded
28    // normalization and path segment normalization. Fails on characters disallowed in URLs
29    // (e.g. NULLs). See `Normalization and Comparison
30    // <https://tools.ietf.org/html/rfc3986#section-6>`_ for details of normalization. Note that
31    // this options does not perform `case normalization
32    // <https://tools.ietf.org/html/rfc3986#section-6.2.2.1>`_
33    message NormalizePathRFC3986 {
34    }
35
36    // Determines if adjacent slashes are merged into one. A common use case is for a request path
37    // header. Using this option in ``:ref: PathNormalizationOptions
38    // <envoy_v3_api_msg_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.PathNormalizationOptions>``
39    // will allow incoming requests with path ``//dir///file`` to match against route with ``prefix``
40    // match set to ``/dir``. When using for header transformations, note that slash merging is not
41    // part of `HTTP spec <https://tools.ietf.org/html/rfc3986>`_ and is provided for convenience.
42    message MergeSlashes {
43    }
44
45    oneof operation_specifier {
46      option (validate.required) = true;
47
48      // Enable path normalization per RFC 3986.
49      NormalizePathRFC3986 normalize_path_rfc_3986 = 2;
50
51      // Enable merging adjacent slashes.
52      MergeSlashes merge_slashes = 3;
53    }
54  }
55
56  // A list of operations to apply. Transformations will be performed in the order that they appear.
57  repeated Operation operations = 1;
58}
59