Is there any way to get the destination IP address in the stream layer
The SNI header of the destination can be gotten from
Similarly, how to get the destination IP address in the stream(L4) or L3
layer from the request?
Suppose my request is as follows
curl https://DOMAIN.EXAMPLE <https://domain.example/>* --resolve
I want to get the IP 192.0.2.17
Which nginx variable would be mapped to this?
In my module, I am allocating some memory for each request and saving the
ptr in my module context. I am registering a callback using
ngx_http_cleanup_add to perform cleanup for each request. I am releasing
the memory for the allocation in the cleanup callback. In the log phase, I
want to make available the contents of the memory I allocated as an nginx
However, when I try to print this variable in the log, the memory has
already been de-allocated. It looks like the clean-up handlers are called
before the log phase. Since I have released the memory in the cleanup
handler, I have nothing to log in the log phase. Is there a way to defer
the calling of the clean-up handler until after the log phase?