Description:
We would like to use this expression to escape & in the Location header that we set to redirect to a login page
%CEL(request.path.replace("&", "%%26"))%
responseOverride:
- match:
statusCodes:
- type: Value
value: 401
response:
header:
set:
- name: Location
value: https://example.dev/oidc/login?rd="%REQ(:scheme)%://%REQ(:authority)%%CEL(request.path.replace("&", "%%26"))%"
statusCode: 302
But the Envoy proxy logs this:
failed to create an expression: No overload found in reference resolve step for replace
[optional Relevant Links:]
I found this PR, which sounds like it added string function to CEL expressions, but maybe not in this context?
envoyproxy/envoy#40510
Description:
We would like to use this expression to escape
&in the Location header that we set to redirect to a login page%CEL(request.path.replace("&", "%%26"))%But the Envoy proxy logs this:
failed to create an expression: No overload found in reference resolve step for replace[optional Relevant Links:]
I found this PR, which sounds like it added string function to CEL expressions, but maybe not in this context?
envoyproxy/envoy#40510