From 4d9931786d644f7a99bbc2eb7a9e369c3bde7a45 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Mon, 29 May 2023 01:42:31 +0200 Subject: net.http.server: Return request ID in header to aid debugging Eases locating the request in logs --- net/http/server.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/http') 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; -- cgit v1.2.3