From 679474405392564918f652f8abb78b878f51036f Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Mon, 23 Jul 2012 23:05:32 +0200 Subject: mod_bosh: Use new format for headers when checking for proxies to get the originating IP --- plugins/mod_bosh.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/mod_bosh.lua b/plugins/mod_bosh.lua index 8b612286..2ac6b4ed 100644 --- a/plugins/mod_bosh.lua +++ b/plugins/mod_bosh.lua @@ -56,7 +56,7 @@ local trusted_proxies = module:get_option_set("trusted_proxies", {"127.0.0.1"}). local function get_ip_from_request(request) local ip = request.conn:ip(); - local forwarded_for = request.headers["x-forwarded-for"]; + local forwarded_for = request.headers.x_forwarded_for; if forwarded_for then forwarded_for = forwarded_for..", "..ip; for forwarded_ip in forwarded_for:gmatch("[^%s,]+") do -- cgit v1.2.3