Software / code / prosody
Comparison
plugins/mod_bosh.lua @ 8185:e89320b8a789
Merge 0.10 -> trunk
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Fri, 28 Jul 2017 23:47:38 +0100 |
| parent | 8101:3e25d96571d1 |
| parent | 8182:048a83433295 |
| child | 8489:fc8ef0943b60 |
comparison
equal
deleted
inserted
replaced
| 8181:79f73af4c410 | 8185:e89320b8a789 |
|---|---|
| 47 local cross_domain = module:get_option("cross_domain_bosh", false); | 47 local cross_domain = module:get_option("cross_domain_bosh", false); |
| 48 | 48 |
| 49 if cross_domain == true then cross_domain = "*"; end | 49 if cross_domain == true then cross_domain = "*"; end |
| 50 if type(cross_domain) == "table" then cross_domain = table.concat(cross_domain, ", "); end | 50 if type(cross_domain) == "table" then cross_domain = table.concat(cross_domain, ", "); end |
| 51 | 51 |
| 52 local trusted_proxies = module:get_option_set("trusted_proxies", {"127.0.0.1"})._items; | 52 local trusted_proxies = module:get_option_set("trusted_proxies", { "127.0.0.1", "::1" })._items; |
| 53 | 53 |
| 54 local function get_ip_from_request(request) | 54 local function get_ip_from_request(request) |
| 55 local ip = request.conn:ip(); | 55 local ip = request.conn:ip(); |
| 56 local forwarded_for = request.headers.x_forwarded_for; | 56 local forwarded_for = request.headers.x_forwarded_for; |
| 57 if forwarded_for then | 57 if forwarded_for then |