lua.ingress_current_zone_header.lua Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of envoy-control-core Show documentation
Show all versions of envoy-control-core Show documentation
Production-ready Control Plane for Service Mesh based on Envoy Proxy.
function envoy_on_request(handle)
end
function envoy_on_response(handle)
local traffic_splitting_zone_header_name = handle:metadata():get("traffic_splitting_zone_header_name") or ""
local current_zone = handle:metadata():get("current_zone") or ""
if traffic_splitting_zone_header_name == "" then
return
end
handle:headers():add(traffic_splitting_zone_header_name, current_zone)
end