Package io.hawt.web.filters
Class CORSFilter
- java.lang.Object
-
- io.hawt.web.filters.HttpHeaderFilter
-
- io.hawt.web.filters.CORSFilter
-
- All Implemented Interfaces:
javax.servlet.Filter
public class CORSFilter extends HttpHeaderFilter
https://developer.mozilla.org/ja/docs/Web/HTTP/Headers/Access-Control-Allow-Origin
-
-
Field Summary
Fields Modifier and Type Field Description static StringACCESS_CONTROL_ALLOW_ORIGINstatic StringENABLE_CORSstatic StringHAWTIO_ACCESS_CONTROL_ALLOW_ORIGINstatic StringHAWTIO_ENABLE_CORS-
Fields inherited from class io.hawt.web.filters.HttpHeaderFilter
ALLOW_X_FRAME_SAME_ORIGIN, HAWTIO_ALLOW_X_FRAME_SAME_ORIGIN
-
-
Constructor Summary
Constructors Constructor Description CORSFilter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddHeaders(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)voidinit(javax.servlet.FilterConfig filterConfig)-
Methods inherited from class io.hawt.web.filters.HttpHeaderFilter
destroy, doFilter, getConfigParameter, isXFrameSameOriginAllowed
-
-
-
-
Field Detail
-
ENABLE_CORS
public static final String ENABLE_CORS
- See Also:
- Constant Field Values
-
HAWTIO_ENABLE_CORS
public static final String HAWTIO_ENABLE_CORS
- See Also:
- Constant Field Values
-
ACCESS_CONTROL_ALLOW_ORIGIN
public static final String ACCESS_CONTROL_ALLOW_ORIGIN
- See Also:
- Constant Field Values
-
HAWTIO_ACCESS_CONTROL_ALLOW_ORIGIN
public static final String HAWTIO_ACCESS_CONTROL_ALLOW_ORIGIN
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException- Specified by:
initin interfacejavax.servlet.Filter- Overrides:
initin classHttpHeaderFilter- Throws:
javax.servlet.ServletException
-
addHeaders
protected void addHeaders(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)- Specified by:
addHeadersin classHttpHeaderFilter
-
-