mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-24 17:29:28 +01:00
Use correct virtual host when consulting trusted_proxies
This commit is contained in:
parent
9c2392f6e9
commit
15dcff92e8
@ -530,7 +530,8 @@ analyze_ip_xff(IP, [], _Host) -> IP;
|
||||
analyze_ip_xff({IPLast, Port}, XFF, Host) ->
|
||||
[ClientIP | ProxiesIPs] = str:tokens(XFF, <<", ">>) ++
|
||||
[misc:ip_to_list(IPLast)],
|
||||
TrustedProxies = ejabberd_option:trusted_proxies(Host),
|
||||
ServerHost = ejabberd_router:host_of_route(Host),
|
||||
TrustedProxies = ejabberd_option:trusted_proxies(ServerHost),
|
||||
IPClient = case is_ipchain_trusted(ProxiesIPs,
|
||||
TrustedProxies)
|
||||
of
|
||||
|
Loading…
Reference in New Issue
Block a user