com.atlassian.jira.web.filters.accesslog
Class AccessLogIPAddressUtil
java.lang.Object
com.atlassian.jira.web.filters.accesslog.AccessLogIPAddressUtil
public class AccessLogIPAddressUtil
- extends Object
This can give back a IP address String that take into account proxies and X-Forwarded-For etc...
Method Summary |
static String |
getRemoteAddr(javax.servlet.http.HttpServletRequest httpServletRequest)
This will return a set of IP addresses that MAY include PROXY forwarded addresses |
static String |
getShortenedRequestUrl(javax.servlet.http.HttpServletRequest httpServletRequest)
This will shorten the Request URL into something that is more acceptable from a logging point of view |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AccessLogIPAddressUtil
public AccessLogIPAddressUtil()
getRemoteAddr
public static String getRemoteAddr(javax.servlet.http.HttpServletRequest httpServletRequest)
- This will return a set of IP addresses that MAY include PROXY forwarded addresses
- Parameters:
httpServletRequest
- the request in play
- Returns:
- an address in the format nnn.nnn.nnn.nnn [, nnn.nnn.nnn.nnn ...]
getShortenedRequestUrl
public static String getShortenedRequestUrl(javax.servlet.http.HttpServletRequest httpServletRequest)
- This will shorten the Request URL into something that is more acceptable from a logging point of view
- Parameters:
httpServletRequest
- the request in play
- Returns:
- the request URL shortened down to remove hostname and context
Copyright © 2002-2013 Atlassian. All Rights Reserved.