Software /
code /
prosody
Diff
plugins/mod_bosh.lua @ 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 |
parent | 4880:6d96e2e717c1 |
child | 5013:ab693eea0869 |
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