diff --git a/plugins/mod_http.lua b/plugins/mod_http.lua index 84e2d18f1..408e401ec 100644 --- a/plugins/mod_http.lua +++ b/plugins/mod_http.lua @@ -256,7 +256,7 @@ end module:wrap_object_event(server._events, false, function (handlers, event_name, event_data) local request = event_data.request; - if request then + if request and is_trusted_proxy(request.conn:ip()) then -- Not included in eg http-error events request.ip = get_ip_from_request(request); end