CacheFilter: parses the allowed_vary_headers from the cache config. (#12928)

Commit Message: CacheFilter: parses the allowed_vary_headers from the cache config.

Additional Description:
Parses the allowlist from the cache config proto; this allows users to define a set of rules to control which headers can be varied in the cache.

Risk Level: Low
Testing: Unit testing
Docs Changes: Updated cache proto's comments regarding allowed_vary_headers
Release Notes: N/A
Fixes #10131

Signed-off-by: Caio <caiomelo@google.com>

Mirrored from https://github.com/envoyproxy/envoy @ 6a994d5afcd7fa038beac5113951afe6daaaf677
master-ci-test
data-plane-api(CircleCI) 4 years ago
parent bb11e1bb20
commit 25c2283fff
  1. 7
      envoy/config/filter/http/cache/v2alpha/cache.proto
  2. 7
      envoy/extensions/filters/http/cache/v3alpha/cache.proto
  3. 7
      envoy/extensions/filters/http/cache/v4alpha/cache.proto

@ -48,17 +48,14 @@ message CacheConfig {
// Config specific to the cache storage implementation.
google.protobuf.Any typed_config = 1 [(validate.rules).any = {required: true}];
// [#not-implemented-hide:]
// <TODO(toddmgreer) implement *vary* headers>
//
// List of allowed *Vary* headers.
// List of matching rules that defines allowed *Vary* headers.
//
// The *vary* response header holds a list of header names that affect the
// contents of a response, as described by
// https://httpwg.org/specs/rfc7234.html#caching.negotiated.responses.
//
// During insertion, *allowed_vary_headers* acts as a allowlist: if a
// response's *vary* header mentions any header names that aren't in
// response's *vary* header mentions any header names that aren't matched by any rules in
// *allowed_vary_headers*, that response will not be cached.
//
// During lookup, *allowed_vary_headers* controls what request headers will be

@ -52,17 +52,14 @@ message CacheConfig {
// Config specific to the cache storage implementation.
google.protobuf.Any typed_config = 1 [(validate.rules).any = {required: true}];
// [#not-implemented-hide:]
// <TODO(toddmgreer) implement *vary* headers>
//
// List of allowed *Vary* headers.
// List of matching rules that defines allowed *Vary* headers.
//
// The *vary* response header holds a list of header names that affect the
// contents of a response, as described by
// https://httpwg.org/specs/rfc7234.html#caching.negotiated.responses.
//
// During insertion, *allowed_vary_headers* acts as a allowlist: if a
// response's *vary* header mentions any header names that aren't in
// response's *vary* header mentions any header names that aren't matched by any rules in
// *allowed_vary_headers*, that response will not be cached.
//
// During lookup, *allowed_vary_headers* controls what request headers will be

@ -52,17 +52,14 @@ message CacheConfig {
// Config specific to the cache storage implementation.
google.protobuf.Any typed_config = 1 [(validate.rules).any = {required: true}];
// [#not-implemented-hide:]
// <TODO(toddmgreer) implement *vary* headers>
//
// List of allowed *Vary* headers.
// List of matching rules that defines allowed *Vary* headers.
//
// The *vary* response header holds a list of header names that affect the
// contents of a response, as described by
// https://httpwg.org/specs/rfc7234.html#caching.negotiated.responses.
//
// During insertion, *allowed_vary_headers* acts as a allowlist: if a
// response's *vary* header mentions any header names that aren't in
// response's *vary* header mentions any header names that aren't matched by any rules in
// *allowed_vary_headers*, that response will not be cached.
//
// During lookup, *allowed_vary_headers* controls what request headers will be

Loading…
Cancel
Save