Software /
code /
prosody
Diff
plugins/mod_http.lua @ 11382:a0477656258c
Merge 0.11->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 18 Feb 2021 12:02:11 +0100 |
parent | 11066:dc41c8dfd2b1 |
parent | 11381:8603011e51fe |
child | 11383:98b7ae7064b2 |
line wrap: on
line diff
--- a/plugins/mod_http.lua Tue Feb 16 23:10:23 2021 +0100 +++ b/plugins/mod_http.lua Thu Feb 18 12:02:11 2021 +0100 @@ -256,7 +256,7 @@ 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