mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-11 12:46:49 +00:00
feat(logs): each log line names its request, user and client address
A request gets nginx's $request_id (or a new one when it comes without a valid one) and sends it back in X-Request-ID. The app log's lines carry the logger, process and thread, the request ID, the signed-in user and the client address; gunicorn's access lines carry the client address from X-Real-IP and the same request ID, so the two logs can be joined.
This commit is contained in:
parent
9bae63f8c1
commit
fdd7310297
6 changed files with 95 additions and 2 deletions
|
|
@ -25,6 +25,7 @@ server {
|
|||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Forwarded-Proto $wvc_forwarded_proto;
|
||||
proxy_set_header X-Request-ID $request_id;
|
||||
proxy_connect_timeout 1800;
|
||||
proxy_read_timeout 1800;
|
||||
proxy_send_timeout 1800;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue