if (!this.accepts(request)) {
filterChain.doFilter(request, response);
return;
}
final BufferingResponse capturedResponse = new BufferingResponse(response);
filterChain.doFilter(request, capturedResponse);
// Get contents
final String contents = capturedResponse.getContents();
if (contents != null && StringUtils.contains(response.getContentType(), "html")) {
final int bodyIndex = contents.indexOf("</body>");