Having trouble reading header values on my Ngnix configuration, on the client side, I am using Golang and appending the header. usually on the server side, there is no issue with extracting the information from the headers
metadata.AppendToOutgoingContext(ctx, MD)
while reading works using metadata.FromIncomingContext(ctx)
I need to make a decision on the ngnix which requires reading a specific header “lb-header: value” but having trouble reading the value and setting a local variable.
tried so far
- set $value $http_lb_header
- lua code
for k, v in pairs(headers) do
ngx.log(ngx.ERR, "we got header: ", k, ":", v)
end```
thanks in advance!