Implement generate-request-id

Fixes https://github.com/kubernetes/ingress-nginx/issues/2546
This commit is contained in:
Karl Stoney 2018-05-21 08:32:50 +01:00
parent d61eb2da7c
commit 206d32a2cd
3 changed files with 12 additions and 0 deletions

View file

@ -277,7 +277,9 @@ http {
# If no such header is provided, it can provide a random value.
map $http_x_request_id $req_id {
default $http_x_request_id;
{{ if $cfg.GenerateRequestId }}
"" $request_id;
{{ end }}
}
{{ if $cfg.ComputeFullForwardedFor }}