-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
41 lines (30 loc) · 1.15 KB
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
daemon off;
pid nginx.pid;
error_log stderr error;
http {
log_format logger-json escape=json '{"source": "nginx", "time": $msec, "resp_body_size": $body_bytes_sent, "host": "$http_host", "address": "$remote_addr", "request_length": $request_length, "method": "$request_method", "uri": "$request_uri", "status": $status, "user_agent": "$http_user_agent", "resp_time": $request_time, "upstream_addr": "$upstream_addr"}';
access_log /dev/stdout logger-json;
map $http_x_request_id $req_id {
default $http_x_request_id;
"" $request_id;
}
map $http_x_request_source $req_source {
default $http_x_request_source;
"" "web";
}
map $http_x_request_level $req_level {
default $http_x_request_level;
"" "0";
}
server {
listen 8080;
location / {
proxy_pass http://localhost:8081;
proxy_set_header Host $host;
proxy_set_header X-REQUEST-ID $req_id;
proxy_set_header X-REQUEST-SOURCE $req_source;
proxy_set_header X-REQUEST-LEVEL $req_level;
}
}
}
events {}