public class TrustedProxyManagerImpl extends Object implements TrustedProxyManager
| Modifier and Type | Field and Description |
|---|---|
protected static String |
REQUESTED_PROXIES_CACHE |
| Constructor and Description |
|---|
TrustedProxyManagerImpl(PropertyManager propertyManager,
com.atlassian.cache.Cache<String,Boolean> cache,
ClusterMessageService clusterMessageService) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addAddress(String remoteAddress)
Adds to the list of servers we trust.
|
Set<String> |
getAddresses()
Returns the addresses of the trusted proxy servers, or an empty set if there are none.
|
boolean |
isTrusted(String remoteAddress)
Returns true if the proxy server is trusted, false otherwise.
|
void |
registerListeners() |
void |
removeAddress(String remoteAddress)
Removes from the list of trusted servers.
|
void |
unregisterListeners() |
protected static final String REQUESTED_PROXIES_CACHE
public TrustedProxyManagerImpl(PropertyManager propertyManager, com.atlassian.cache.Cache<String,Boolean> cache, ClusterMessageService clusterMessageService)
@PostConstruct public void registerListeners()
@PreDestroy public void unregisterListeners()
public boolean isTrusted(String remoteAddress)
isTrusted in interface TrustedProxyManagerremoteAddress - address of the proxypublic Set<String> getAddresses()
getAddresses in interface TrustedProxyManagerpublic boolean addAddress(String remoteAddress)
addAddress in interface TrustedProxyManagerremoteAddress - host name or IP addresspublic void removeAddress(String remoteAddress)
removeAddress in interface TrustedProxyManagerremoteAddress - hostname or IP addressCopyright © 2023 Atlassian. All rights reserved.