nginx request_id

## nginx conf

nginx location

set $temp_request_id $http_x_request_id;
if ($temp_request_id = "") {
set $temp_request_id $request_id;
}

proxy_set_header x_request_id "";
proxy_set_header X-Request-Id $temp_request_id;

proxy_set_header X-Request-Id $request_id;


## tomcat access_log
%{X-Request-Id}i

posted @ 2019-12-02 13:38  zbjice  阅读(2187)  评论(0)    收藏  举报