Subclass WebClientInfo
, to provide a public method that delegates to secure WebClientInfo.getRemoteAddr()
. Then create a method for the request in the custom class RequestCycle
. In Wicket 1.3-1.4, I achieved this by subclassing RequestCycle
, but since 1.5 it seems like everything is different: RequestCycle in Wicket 1.5
WebClientInfo
has the advantage of requesting the X-Forwarded-For
erquest parameter and returning the correct IP address if your server is behind a proxy / load balancer that uses XFF .
source share