From 60515547bcf36da3a9c55d3e8f62c2a286decc98 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Tue, 26 Jan 2021 21:03:20 +0000 Subject: [PATCH] DEV: Use $upstream for logging performance headers in NGINX (#11856) This ensures that the logs will still work, even if the headers are hidden with `proxy_hide_header` --- config/nginx.sample.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/nginx.sample.conf b/config/nginx.sample.conf index b417c85388e..372efcc25ae 100644 --- a/config/nginx.sample.conf +++ b/config/nginx.sample.conf @@ -29,7 +29,7 @@ map $http_x_forwarded_proto $thescheme { https https; } -log_format log_discourse '[$time_local] "$http_host" $remote_addr "$request" "$http_user_agent" "$sent_http_x_discourse_route" $status $bytes_sent "$http_referer" $upstream_response_time $request_time "$sent_http_x_discourse_username" "$sent_http_x_discourse_trackview" "$sent_http_x_queue_time" "$sent_http_x_redis_calls" "$sent_http_x_redis_time" "$sent_http_x_sql_calls" "$sent_http_x_sql_time"'; +log_format log_discourse '[$time_local] "$http_host" $remote_addr "$request" "$http_user_agent" "$sent_http_x_discourse_route" $status $bytes_sent "$http_referer" $upstream_response_time $request_time "$upstream_http_x_discourse_username" "$upstream_http_x_discourse_trackview" "$upstream_http_x_queue_time" "$upstream_http_x_redis_calls" "$upstream_http_x_redis_time" "$upstream_http_x_sql_calls" "$upstream_http_x_sql_time"'; server {