mirror of
https://github.com/processone/ejabberd
synced 2025-10-06 03:50:15 +02:00
Use correct virtual host when consulting trusted_proxies
This commit is contained in:
parent
9c2392f6e9
commit
15dcff92e8
1 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue