Class ConfigAwareEtagFilter
java.lang.Object
org.springframework.web.filter.GenericFilterBean
org.springframework.web.filter.OncePerRequestFilter
org.springframework.web.filter.ShallowEtagHeaderFilter
org.craftercms.engine.servlet.filter.ConfigAwareEtagFilter
- All Implemented Interfaces:
jakarta.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 ConfigAwareEtagFilter
extends org.springframework.web.filter.ShallowEtagHeaderFilter
Extension of
ShallowEtagHeaderFilter that supports custom configurations- Since:
- 3.1.10
- Author:
- joseross
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanIndicates if the filter is enabledprotected String[]The list of url patterns to that should be processedprotected org.springframework.util.PathMatcherThePathMatcherused to compare urlsFields inherited from class org.springframework.web.filter.OncePerRequestFilter
ALREADY_FILTERED_SUFFIXFields inherited from class org.springframework.web.filter.GenericFilterBean
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanshouldNotFilter(jakarta.servlet.http.HttpServletRequest request) Methods inherited from class org.springframework.web.filter.ShallowEtagHeaderFilter
disableContentCaching, doFilterInternal, generateETagHeaderValue, isEligibleForEtag, isWriteWeakETag, setWriteWeakETag, shouldNotFilterAsyncDispatchMethods inherited from class org.springframework.web.filter.OncePerRequestFilter
doFilter, doFilterNestedErrorDispatch, getAlreadyFilteredAttributeName, isAsyncDispatch, isAsyncStarted, shouldNotFilterErrorDispatchMethods inherited from class org.springframework.web.filter.GenericFilterBean
addRequiredProperty, afterPropertiesSet, createEnvironment, destroy, getEnvironment, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setEnvironment, setServletContext
-
Field Details
-
enabled
protected boolean enabledIndicates if the filter is enabled -
includedUrls
The list of url patterns to that should be processed -
pathMatcher
protected org.springframework.util.PathMatcher pathMatcherThePathMatcherused to compare urls
-
-
Constructor Details
-
ConfigAwareEtagFilter
@ConstructorProperties({"enabled","includedUrls"}) public ConfigAwareEtagFilter(boolean enabled, String[] includedUrls)
-
-
Method Details
-
shouldNotFilter
protected boolean shouldNotFilter(jakarta.servlet.http.HttpServletRequest request) throws jakarta.servlet.ServletException - Overrides:
shouldNotFilterin classorg.springframework.web.filter.OncePerRequestFilter- Throws:
jakarta.servlet.ServletException
-