Redirect rules with http header names

What is the name of the domain?

.karbonhq.com

What is the issue you’re encountering

The http header names expression is not working when being tested with Trace

What steps have you taken to resolve the issue?

We have replicated the issue and have been testing with the trace builder. Some header work and other do not

What are the steps to reproduce the issue?

Create a redirect rule with the following expression. any(http.request.headers.names[*] == "X-Company-E2E"). I don’t think it matters what the redirect rule does (in our case we are lowering the security level for our test runners)
Add a trace request with the same header, e.g X-Company-E2E = true
Run the trace.
No configuration rules are hit

If we change the header name and remove the last character, e.g ‘X-Company-E2’ this works. This isn’t a max length either as other combinations also work.

Try this instead:

any(http.request.headers.names[*] == "x-company-e2e")

Note: In HTTP/2 the names of HTTP headers are always in lowercase.

2 Likes

Lowercase is also not working. I thought everything was converted to lowercase anyway. Do you see the same behaviour? Or does the trace hit a configuration rule when using the value above?

Nope. I copied that expression right from my rule that is redirecting for that header:

curl -svo /dev/null https://b8a.me/test -H "X-Company-E2E: true"

1 Like

Okay. So this is likely to be a defect with Trace and not with the header redirect rules

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.