public class CORSFilter
extends org.springframework.web.filter.OncePerRequestFilter
| Modifier and Type | Field and Description |
|---|---|
static String |
ALLOW_CREDENTIALS |
static String |
ALLOW_HEADERS |
static String |
ALLOW_METHODS |
static String |
ALLOW_ORIGIN |
static String |
MAX_AGE |
| Constructor and Description |
|---|
CORSFilter() |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy() |
protected void |
doFilterInternal(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterChain filterChain) |
void |
setAllowCredentials(String allowCredentials) |
void |
setAllowHeaders(String allowHeaders) |
void |
setAllowMethods(String allowMethods) |
void |
setAllowOrigins(String allowOrigins) |
void |
setDisableCORS(boolean disableCORS) |
void |
setMaxAge(String maxAge) |
doFilter, getAlreadyFilteredAttributeName, isAsyncDispatch, isAsyncStarted, shouldNotFilter, shouldNotFilterAsyncDispatch, shouldNotFilterErrorDispatchpublic static final String ALLOW_ORIGIN
public static final String ALLOW_METHODS
public static final String MAX_AGE
public static final String ALLOW_HEADERS
public static final String ALLOW_CREDENTIALS
public void destroy()
destroy in interface javax.servlet.Filterdestroy in interface org.springframework.beans.factory.DisposableBeandestroy in class org.springframework.web.filter.GenericFilterBeanpublic void setAllowOrigins(String allowOrigins)
public void setAllowMethods(String allowMethods)
public void setMaxAge(String maxAge)
public void setAllowHeaders(String allowHeaders)
public void setAllowCredentials(String allowCredentials)
public void setDisableCORS(boolean disableCORS)
protected void doFilterInternal(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterChain filterChain)
throws javax.servlet.ServletException,
IOException
doFilterInternal in class org.springframework.web.filter.OncePerRequestFilterjavax.servlet.ServletExceptionIOExceptionCopyright © 2018 CrafterCMS. All rights reserved.