aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2023-05-29 01:42:31 +0200
committerKim Alvefur <zash@zash.se>2023-05-29 01:42:31 +0200
commit4d9931786d644f7a99bbc2eb7a9e369c3bde7a45 (patch)
treea7e729a728be66c95f6d8de9803506e61424851f
parent9480954e92895449674183f166af2ad657396f79 (diff)
downloadprosody-4d9931786d644f7a99bbc2eb7a9e369c3bde7a45.tar.gz
prosody-4d9931786d644f7a99bbc2eb7a9e369c3bde7a45.zip
net.http.server: Return request ID in header to aid debugging
Eases locating the request in logs
-rw-r--r--net/http/server.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/http/server.lua b/net/http/server.lua
index fdcbde4a..7d2fec34 100644
--- a/net/http/server.lua
+++ b/net/http/server.lua
@@ -260,7 +260,7 @@ function handle_request(conn, request, finish_cb)
request = request;
is_head_request = is_head_request;
status_code = 200;
- headers = { date = date_header, connection = response_conn_header };
+ headers = { date = date_header; connection = response_conn_header; x_request_id = request.id };
persistent = persistent;
conn = conn;
send = _M.send_response;