Closed
Description
Describe the bug
When using an API Key policy on the server level, it is possible to see an NGINX warning about an uninitialsed variable. This happens when visiting an undefined route.
To Reproduce
- Deploy the example in api key folder. (which has routes and
/tea
and/coffee
but not/
) curl cafe.example.com/
- See warn in console.
2024/06/24 15:21:43 [warn] 36#36: *4 using uninitialized "header_query_value" variable, client: 10.244.0.1, server: cafe.example.com, request: "GET / HTTP/1.1", subrequest: "/_validate_apikey_njs", host: "cafe.example.com"
10.244.0.1 - - [24/Jun/2024:15:21:43 +0000] "GET / HTTP/1.1" 401 179 "-" "curl/8.6.0" "-"
Expected behavior
Reaching an undefined route which is behind an API Key policy, should not have a warning in the logs.
Your environment
- Version of the Ingress Controller - v3.6.0-snapshot