Optimize HerokuHttpRedirectFilter.