Created
October 2, 2020 14:00
-
-
Save maksim-paskal/f2473cacd7b5a850826748d2bd0c5a26 to your computer and use it in GitHub Desktop.
to get ratelimit service with cookie name
rate_limits:
- actions:
- dynamic_metadata:
descriptor_key: "cookie-cid"
metadata_key:
key: envoy.filters.http.lua.cookie
path:
- key: CID
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
envoy v1.15 (stable) can't use cookie in header_to_metadata extension (this available in latest envoy only) https://www.envoyproxy.io/docs/envoy/v1.15.2/api-v3/extensions/filters/http/header_to_metadata/v3/header_to_metadata.proto#extensions-filters-http-header-to-metadata-v3-config-rule
to use cookie in metadata - you can use Lua extension and add it in http_filters - for example this code will add cookie name CID to metadata envoy.filters.http.lua.cookie to test this code - you add to access log
%DYNAMIC_METADATA(envoy.filters.http.lua.cookie)%