Class HttpProxyFilter
java.lang.Object
org.springframework.web.filter.GenericFilterBean
org.springframework.web.filter.OncePerRequestFilter
org.craftercms.engine.servlet.filter.HttpProxyFilter
- 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 HttpProxyFilter
extends org.springframework.web.filter.OncePerRequestFilter
Implementation of
Filter that delegates requests to a proxy- Since:
- 3.1.7
- Author:
- joseross
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected booleanIndicates if the proxy is enabledprotected org.springframework.security.web.util.matcher.RequestMatcherprotected org.springframework.web.servlet.mvc.ControllerThe proxy to useFields inherited from class org.springframework.web.filter.OncePerRequestFilter
ALREADY_FILTERED_SUFFIX -
Constructor Summary
ConstructorsConstructorDescriptionHttpProxyFilter(boolean enabled, org.springframework.web.servlet.mvc.Controller proxyController, String[] excludedUrls) -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoFilterInternal(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.FilterChain filterChain) getHeaders(SiteContext siteContext, String requestUri, String headerType) protected StringgetTargetUrl(SiteContext siteContext, String requestUri) protected booleanshouldNotFilter(jakarta.servlet.http.HttpServletRequest request) Methods inherited from class org.springframework.web.filter.OncePerRequestFilter
doFilter, doFilterNestedErrorDispatch, getAlreadyFilteredAttributeName, isAsyncDispatch, isAsyncStarted, shouldNotFilterAsyncDispatch, 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
-
CONFIG_KEY_SERVERS
- See Also:
-
CONFIG_KEY_PATTERNS
- See Also:
-
CONFIG_KEY_ID
- See Also:
-
CONFIG_KEY_URL
- See Also:
-
CONFIG_KEY_HEADERS_SERVER
- See Also:
-
CONFIG_KEY_HEADERS_CLIENT
- See Also:
-
CONFIG_KEY_HEADER
- See Also:
-
CONFIG_KEY_NAME
- See Also:
-
CONFIG_KEY_VALUE
- See Also:
-
enabled
protected boolean enabledIndicates if the proxy is enabled -
proxyController
protected org.springframework.web.servlet.mvc.Controller proxyControllerThe proxy to use -
excludedMatcher
protected org.springframework.security.web.util.matcher.RequestMatcher excludedMatcher
-
-
Constructor Details
-
HttpProxyFilter
@ConstructorProperties({"enabled","proxyController","excludedUrls"}) public HttpProxyFilter(boolean enabled, org.springframework.web.servlet.mvc.Controller proxyController, String[] excludedUrls)
-
-
Method Details
-
shouldNotFilter
protected boolean shouldNotFilter(jakarta.servlet.http.HttpServletRequest request) - Overrides:
shouldNotFilterin classorg.springframework.web.filter.OncePerRequestFilter
-
doFilterInternal
protected void doFilterInternal(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.FilterChain filterChain) throws jakarta.servlet.ServletException, IOException - Specified by:
doFilterInternalin classorg.springframework.web.filter.OncePerRequestFilter- Throws:
jakarta.servlet.ServletExceptionIOException
-
getTargetUrl
-
getHeaders
-