Changeset

4998:f6c1f98419be

mod_bosh: Use new format for headers when checking for proxies to get the originating IP
author Kim Alvefur <zash@zash.se>
date Mon, 23 Jul 2012 23:05:32 +0200
parents 4997:61083e2b1392
children 4999:d5a3c5c1873c
files plugins/mod_bosh.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_bosh.lua	Mon Jul 23 18:57:28 2012 +0100
+++ b/plugins/mod_bosh.lua	Mon Jul 23 23:05:32 2012 +0200
@@ -56,7 +56,7 @@
 
 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