Class ScriptFilter
java.lang.Object
org.craftercms.engine.scripting.impl.ScriptFilter
- All Implemented Interfaces:
jakarta.servlet.Filter
Servlet filter that passes the request through a series of scripts that act as filters too.
- Author:
- avasquez
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()voiddoFilter(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response, jakarta.servlet.FilterChain originalChain) protected booleanexcludeFilter(String requestUri, String[] excludes) protected List<ScriptFilter.FilterMapping> protected jakarta.servlet.FilterChaingetScriptFilterChain(jakarta.servlet.http.HttpServletRequest httpRequest, jakarta.servlet.FilterChain chain) protected booleanincludeFilter(String requestUri, String[] includes) voidinit(jakarta.servlet.FilterConfig filterConfig) voidsetDisableVariableRestrictions(boolean disableVariableRestrictions) voidsetExcludedUrls(String[] excludedUrls) voidsetPathMatcher(org.springframework.util.PathMatcher pathMatcher) voidsetPluginService(PluginService pluginService)
-
Field Details
-
FILTER_KEY
- See Also:
-
SCRIPT_KEY
- See Also:
-
INCLUDE_MAPPINGS_KEY
- See Also:
-
EXCLUDE_MAPPINGS_KEY
- See Also:
-
FILTER_MAPPINGS_CACHE_KEY
- See Also:
-
pathMatcher
protected org.springframework.util.PathMatcher pathMatcher -
disableVariableRestrictions
protected boolean disableVariableRestrictions -
pluginService
-
excludedUrlsMatcher
protected org.springframework.security.web.util.matcher.RequestMatcher excludedUrlsMatcher
-
-
Constructor Details
-
ScriptFilter
public ScriptFilter(org.craftercms.core.util.cache.CacheTemplate cacheTemplate)
-
-
Method Details
-
setPathMatcher
public void setPathMatcher(org.springframework.util.PathMatcher pathMatcher) -
setDisableVariableRestrictions
public void setDisableVariableRestrictions(boolean disableVariableRestrictions) -
setPluginService
-
setExcludedUrls
-
init
public void init(jakarta.servlet.FilterConfig filterConfig) throws jakarta.servlet.ServletException - Specified by:
initin interfacejakarta.servlet.Filter- Throws:
jakarta.servlet.ServletException
-
doFilter
public void doFilter(jakarta.servlet.ServletRequest request, jakarta.servlet.ServletResponse response, jakarta.servlet.FilterChain originalChain) throws IOException, jakarta.servlet.ServletException - Specified by:
doFilterin interfacejakarta.servlet.Filter- Throws:
IOExceptionjakarta.servlet.ServletException
-
getScriptFilterChain
protected jakarta.servlet.FilterChain getScriptFilterChain(jakarta.servlet.http.HttpServletRequest httpRequest, jakarta.servlet.FilterChain chain) -
destroy
public void destroy()- Specified by:
destroyin interfacejakarta.servlet.Filter
-
getFilterMappings
-
excludeFilter
-
includeFilter
-