Class ContainerNameHttpHeaderFilter
- java.lang.Object
-
- org.springframework.web.filter.GenericFilterBean
-
- org.hawaiiframework.logging.web.filter.AbstractGenericFilterBean
-
- org.hawaiiframework.logging.web.filter.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.
-
-
Constructor Summary
Constructors Constructor Description ContainerNameHttpHeaderFilter(ContainerNameHttpHeaderFilterProperties config)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doFilterInternal(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain filterChain)
Same contract as fordoFilter
.-
Methods inherited from class org.hawaiiframework.logging.web.filter.AbstractGenericFilterBean
doFilter
-
-
-
-
Constructor Detail
-
ContainerNameHttpHeaderFilter
public ContainerNameHttpHeaderFilter(ContainerNameHttpHeaderFilterProperties config)
Constructor.- Parameters:
config
- The configuration.
-
-
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 fordoFilter
.- Specified by:
doFilterInternal
in classAbstractGenericFilterBean
- Throws:
javax.servlet.ServletException
IOException
-
-