diff options
author | Kim Alvefur <zash@zash.se> | 2012-07-23 23:05:32 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2012-07-23 23:05:32 +0200 |
commit | 49d71b5ec14b4021448d9dba3c3aeab028c0091f (patch) | |
tree | e43e637de5b611053a4b8784e4f72cba8f10ce1d | |
parent | 33b4783329a14731c8b8078af366788db2eaf920 (diff) | |
download | prosody-49d71b5ec14b4021448d9dba3c3aeab028c0091f.tar.gz prosody-49d71b5ec14b4021448d9dba3c3aeab028c0091f.zip |
mod_bosh: Use new format for headers when checking for proxies to get the originating IP
-rw-r--r-- | plugins/mod_bosh.lua | 2 |
1 files changed, 1 insertions, 1 deletions
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 |