Class HttpProxyFilter
java.lang.Object
org.springframework.web.filter.GenericFilterBean
org.springframework.web.filter.OncePerRequestFilter
org.craftercms.engine.servlet.filter.HttpProxyFilter
- 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 HttpProxyFilter
extends org.springframework.web.filter.OncePerRequestFilter
Implementation of
Filter
that delegates requests to a proxy- Since:
- 3.1.7
- Author:
- joseross
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
protected boolean
Indicates if the proxy is enabledprotected org.springframework.security.web.util.matcher.RequestMatcher
protected org.springframework.web.servlet.mvc.Controller
The proxy to useFields inherited from class org.springframework.web.filter.OncePerRequestFilter
ALREADY_FILTERED_SUFFIX
-
Constructor Summary
ConstructorDescriptionHttpProxyFilter
(boolean enabled, org.springframework.web.servlet.mvc.Controller proxyController, String[] excludedUrls) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
doFilterInternal
(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain filterChain) getHeaders
(SiteContext siteContext, String requestUri, String headerType) protected String
getTargetUrl
(SiteContext siteContext, String requestUri) protected boolean
shouldNotFilter
(javax.servlet.http.HttpServletRequest request) Methods inherited from class org.springframework.web.filter.OncePerRequestFilter
doFilter, doFilterNestedErrorDispatch, getAlreadyFilteredAttributeName, isAsyncDispatch, isAsyncStarted, shouldNotFilterAsyncDispatch, shouldNotFilterErrorDispatch
Methods 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(javax.servlet.http.HttpServletRequest request) - Overrides:
shouldNotFilter
in classorg.springframework.web.filter.OncePerRequestFilter
-
doFilterInternal
protected void doFilterInternal(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain filterChain) throws javax.servlet.ServletException, IOException - Specified by:
doFilterInternal
in classorg.springframework.web.filter.OncePerRequestFilter
- Throws:
javax.servlet.ServletException
IOException
-
getTargetUrl
-
getHeaders
-