aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_http.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-02-18 12:02:11 +0100
committerKim Alvefur <zash@zash.se>2021-02-18 12:02:11 +0100
commit4b4636ae65f6876ebbbfb8dc066cb03b21b39c17 (patch)
treec77b5040d7126e0e59f77b99b6fd8792960f9ee6 /plugins/mod_http.lua
parent51b055809af1b82334675d61a8204105a7c2c9d2 (diff)
parent80116bf0e3cd26cd843b0b18ee09e09469ffa8e3 (diff)
downloadprosody-4b4636ae65f6876ebbbfb8dc066cb03b21b39c17.tar.gz
prosody-4b4636ae65f6876ebbbfb8dc066cb03b21b39c17.zip
Merge 0.11->trunk
Diffstat (limited to 'plugins/mod_http.lua')
-rw-r--r--plugins/mod_http.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_http.lua b/plugins/mod_http.lua
index 84e2d18f..408e401e 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