Quantcast
Channel: Nginx Forum - Nginx Mailing List - English
Viewing all articles
Browse latest Browse all 7229

Request Id for logging purposes (3 replies)

$
0
0
hi,

I want to be able to identify requests by a unique id.

I'm able to do this in the location section:

proxy_set_header X-Request-Id
$pid-$msec-$remote_addr-$request_length;

but I want instead to set it to a variable, e.g. in the http section:

set $request_id $pid-$msec-$remote_addr-$request_length; ## does
this work?

add_header X-Request-Id $request_id; ## I don't see it in
the response headers

can it work?

TIA!

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Viewing all articles
Browse latest Browse all 7229

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>