public class RequestSourceInterceptor extends JsUnitInterceptor {
public static final String REFERER_HEADER = "Referer";
protected void execute(Action targetAction) throws Exception {
RequestSourceAware aware = ((RequestSourceAware) targetAction);
HttpServletRequest request = request();
aware.setRequestIPAddress(request.getRemoteAddr());
aware.setRequestHost(request.getRemoteHost());
aware.setReferrer(request.getHeader(REFERER_HEADER));
}