public abstract class AbstractCorsFilter extends AbstractMgnlFilter
In cases where CORS request arrives, but is invalid, error 403 is returned by the filter.
In case of request, that is not CORS, this filter just delegates through the filter chain.
Modifier and Type | Class and Description |
---|---|
static class |
AbstractCorsFilter.Headers
CORS related headers.
|
static class |
AbstractCorsFilter.RequestType
Type of the request determined from the incoming
HttpServletRequest . |
Modifier and Type | Field and Description |
---|---|
static String |
OPTIONS_METHOD |
Constructor and Description |
---|
AbstractCorsFilter() |
Modifier and Type | Method and Description |
---|---|
void |
doFilter(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterChain filterChain) |
protected abstract Optional<MgnlFilter> |
getCorsResponseFilter() |
acceptsEncoding, acceptsGzipEncoding, addAndVerifyHeader, addBypass, addMapping, bypasses, destroy, doFilter, getBypasses, getDispatching, getMapping, getMappings, getName, headerContains, init, isEnabled, mapsTo, matches, matchesDispatching, setBypasses, setDispatching, setEnabled, setMappings, setName
public static final String OPTIONS_METHOD
public void doFilter(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain filterChain) throws IOException, javax.servlet.ServletException
doFilter
in class AbstractMgnlFilter
IOException
javax.servlet.ServletException
protected abstract Optional<MgnlFilter> getCorsResponseFilter()
Copyright © 2003–2021 Magnolia International Ltd.. All rights reserved.