public class ResponseHeaderSecurityFilter extends Object implements WebContextLifecycleInterceptor, HeaderNameInterceptor, HeaderValueInterceptor, CookieInterceptor, CookieHeaderValueInterceptor, StatusMessageInterceptor, RedirectLocationInterceptor
| Modifier and Type | Field and Description |
|---|---|
static HumanReadableSize |
MAX_SET_COOKIE_SIZE_DEFAULT |
| Constructor and Description |
|---|
ResponseHeaderSecurityFilter() |
ResponseHeaderSecurityFilter(javax.servlet.http.HttpServletRequest request) |
| Modifier and Type | Method and Description |
|---|---|
javax.servlet.http.Cookie |
checkCookie(javax.servlet.http.Cookie cookie)
检查cookie。
|
String |
checkCookieHeaderValue(String name,
String value,
boolean setHeader)
检查cookie header。
|
String |
checkHeaderName(String name)
检查header名称。
|
String |
checkHeaderValue(String name,
String value)
检查header的值。
|
String |
checkRedirectLocation(String location)
检查重定向location。
|
String |
checkStatusMessage(int sc,
String msg)
检查status消息。
|
void |
commit() |
void |
commitHeaders() |
HumanReadableSize |
getMaxCookieSize() |
void |
prepare() |
void |
setMaxCookieSize(HumanReadableSize maxSetCookieSize) |
public static final HumanReadableSize MAX_SET_COOKIE_SIZE_DEFAULT
public ResponseHeaderSecurityFilter()
public ResponseHeaderSecurityFilter(javax.servlet.http.HttpServletRequest request)
public HumanReadableSize getMaxCookieSize()
public void setMaxCookieSize(HumanReadableSize maxSetCookieSize)
public void prepare()
prepare in interface WebContextLifecycleInterceptorpublic void commitHeaders()
commitHeaders in interface WebContextLifecycleInterceptorpublic void commit()
commit in interface WebContextLifecycleInterceptorpublic String checkHeaderName(String name)
HeaderNameInterceptorcheckHeaderName in interface HeaderNameInterceptornull则丢弃header。public String checkHeaderValue(String name, String value)
HeaderValueInterceptorcheckHeaderValue in interface HeaderValueInterceptornull则表示拒绝该header的值。public javax.servlet.http.Cookie checkCookie(javax.servlet.http.Cookie cookie)
CookieInterceptorcheckCookie in interface CookieInterceptornull则表示拒绝该cookie。 特别支持
CookieSupport类。public String checkCookieHeaderValue(String name, String value, boolean setHeader)
CookieHeaderValueInterceptorcheckCookieHeaderValue in interface CookieHeaderValueInterceptornull则表示拒绝该cookie。public String checkStatusMessage(int sc, String msg)
StatusMessageInterceptorcheckStatusMessage in interface StatusMessageInterceptornull则表示不设置status消息。public String checkRedirectLocation(String location)
RedirectLocationInterceptorcheckRedirectLocation in interface RedirectLocationInterceptornull则表示拒绝该location。Copyright © 2006–2018 TinyGroup. All rights reserved.