public class XForwardedForUtil extends Object
Modifier and Type | Method and Description |
---|---|
static InetAddress |
getTrustedAddress(TrustedProxyManager trustedProxyManager,
javax.servlet.http.HttpServletRequest request)
Returns the originating client address the proxies are forwarding for if the proxies are trusted, otherwise, return the
request address.
|
static String |
getTrustedAddress(TrustedProxyManager trustedProxyManager,
String requestAddress,
String xForwardedFor)
Returns the originating client address the proxies are forwarding for if all the proxies are trusted, otherwise,
return the request address.
|
public static InetAddress getTrustedAddress(TrustedProxyManager trustedProxyManager, javax.servlet.http.HttpServletRequest request)
trustedProxyManager
- used to determine if the proxy address is trustedrequest
- HTTP requestpublic static String getTrustedAddress(TrustedProxyManager trustedProxyManager, String requestAddress, String xForwardedFor)
trustedProxyManager
- used to determine if the proxy address is trustedrequestAddress
- HTTP request addressxForwardedFor
- X-Forwarded-For headerCopyright © 2018 Atlassian. All rights reserved.