protected boolean validateReferer(final HttpServletRequest request) {
if (this.regex == null) {
this.regex = this.getInitParameter(RegexRefererFilter.REGEX_PARAMETER);
}
if (ConditionUtils.isEmpty(this.regex)) {
throw new JSPException("Parameter '" + RegexRefererFilter.REGEX_PARAMETER + "' must be set");
}
if (super.validateReferer(request)) {
String referer = RequestUtils.getReferer(request);
if (Pattern.matches(this.regex, referer)) {
return true;