Class ContainerNameHttpHeaderFilter

  • All Implemented Interfaces:
    javax.servlet.Filter, org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, org.springframework.context.EnvironmentAware, org.springframework.core.env.EnvironmentCapable, org.springframework.web.context.ServletContextAware

    public class ContainerNameHttpHeaderFilter
    extends AbstractGenericFilterBean
    Filter class that will be added in the servlet filter chain to add a http response header to every response. This response header will be the value of the $HOSTNAME environment variable, to show in the frontend in which container this application is running.
    • Method Detail

      • doFilterInternal

        protected void doFilterInternal​(javax.servlet.http.HttpServletRequest request,
                                        javax.servlet.http.HttpServletResponse response,
                                        javax.servlet.FilterChain filterChain)
                                 throws javax.servlet.ServletException,
                                        IOException
        Same contract as for doFilter.
        Specified by:
        doFilterInternal in class AbstractGenericFilterBean
        Throws:
        javax.servlet.ServletException
        IOException