4
Size: a a a
4
4
4
A
4
4
A
---
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
name: xff-filter
spec:
workloadLabels:
app: <my_app_name>
filters:
- listenerMatch:
portNumber: 443
listenerProtocol: HTTP
listenerType: ANY
filterName: envoy.lua
filterType: HTTP
filterConfig:
inlineCode: |
function envoy_on_request(request_handle)
local xff_header = request_handle:headers():get("X-Forwarded-For")
local first_ip = string.gmatch(xff_header, "(%d+.%d+.%d+.%d+)")();
request_handle:headers():add("X-Cust-User-IP", first_ip);
end
4
A
AL
AL
AL
AL
4
4
AL
AL