Changeset

11386:e40ba204c612 0.11

mod_http: Fix trusted proxies check (thanks buildbot) is_trusted_proxy() is only in trunk, I dun goofed when I rebased 8603011e51fe from trunk.
author Kim Alvefur <zash@zash.se>
date Thu, 18 Feb 2021 14:34:38 +0100
parents 11381:8603011e51fe
children 11387:4f97b33e2596 11407:8d6e013377fa
files plugins/mod_http.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_http.lua	Thu Feb 18 12:00:00 2021 +0100
+++ b/plugins/mod_http.lua	Thu Feb 18 14:34:38 2021 +0100
@@ -174,7 +174,7 @@
 
 module:wrap_object_event(server._events, false, function (handlers, event_name, event_data)
 	local request = event_data.request;
-	if request and is_trusted_proxy(request.conn:ip()) then
+	if request and trusted_proxies[request.conn:ip()] then
 		-- Not included in eg http-error events
 		request.ip = get_ip_from_request(request);
 	end