Skip to content

Commit e5bf8da

Browse files
committed
1 parent bc694d3 commit e5bf8da

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

config/http.conf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ http {
3030
'' $server_port;
3131
}
3232

33+
# If we receive X-Request-ID, pass it through; otherwise, pass along the
34+
# request_id generated by nginx
35+
map $http_x_request_id $proxy_x_request_id {
36+
default $http_x_request_id;
37+
'' $request_id;
38+
}
39+
3340
proxy_http_version 1.1;
3441
proxy_set_header Connection "";
3542
proxy_set_header Host $host;
@@ -39,6 +46,7 @@ http {
3946
proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto;
4047
proxy_set_header X-Forwarded-Ssl $proxy_x_forwarded_ssl;
4148
proxy_set_header X-Forwarded-Port $proxy_x_forwarded_port;
49+
proxy_set_header X-Request-ID $proxy_x_request_id;
4250
proxy_set_header X-Forwarded-Host $host;
4351

4452
proxy_read_timeout 600s;

0 commit comments

Comments
 (0)