Is there a simple example of how to read a cookie, or some other header
value, like “Host” from an ngx_http_request_t ?
I see $variables discussed, but I’m not sure how to retrieve them.
I am guessing it has something to do with ngx_http_script_compile/run,
but I don’t fully understand the concept.
Those functions seem to rely on a config file, but what if I’m not
interested in configuring the variable, I just wish to
retrieve Host or a specific Cookie from each request.
Also, at which stage in an upstream module process is the http request
filled?
Are they available in both init_peer and get_peer?