The HTML5 redirect filter is too bold in its redirection behavior. It redirects everything that is not a REST API but it is not enough.
It should redirect after all filters and servlets (after the chain.doFilter()) had the opportunity to handle the request.