Skip to content

Commit bc9d049

Browse files
Merge pull request #152 from IABTechLab/ans-UID2-6248-check-bearer-token-issue
minimal log format to avoid logging bearer tokens/any sensitive headers
2 parents 35e0127 + 9a3b3ca commit bc9d049

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tools/reverse-proxy/nginx.conf

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@ http {
1212
include /etc/nginx/mime.types;
1313
default_type application/octet-stream;
1414

15-
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
16-
'$status $body_bytes_sent "$http_referer" '
17-
'"$http_user_agent" "$http_x_forwarded_for"';
15+
log_format path_status '$remote_addr - $remote_user [$time_local] $request $status';
1816

1917
# Debug log format - shows Host header details for troubleshooting routing issues
18+
# To use, switch access_log below to use debug_routing instead of path_status
2019
log_format debug_routing '$remote_addr [$time_local] "$request" '
2120
'status=$status '
2221
'host="$host" '
@@ -26,7 +25,7 @@ http {
2625
'x_forwarded_host="$http_x_forwarded_host" '
2726
'x_forwarded_proto="$http_x_forwarded_proto"';
2827

29-
access_log /var/log/nginx/access.log debug_routing;
28+
access_log /var/log/nginx/access.log path_status;
3029

3130
sendfile on;
3231
#tcp_nopush on;

0 commit comments

Comments
 (0)