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 WebContextLifecycleInterceptor
public void commitHeaders()
commitHeaders
in interface WebContextLifecycleInterceptor
public void commit()
commit
in interface WebContextLifecycleInterceptor
public String checkHeaderName(String name)
HeaderNameInterceptor
checkHeaderName
in interface HeaderNameInterceptor
null
则丢弃header。public String checkHeaderValue(String name, String value)
HeaderValueInterceptor
checkHeaderValue
in interface HeaderValueInterceptor
null
则表示拒绝该header的值。public javax.servlet.http.Cookie checkCookie(javax.servlet.http.Cookie cookie)
CookieInterceptor
checkCookie
in interface CookieInterceptor
null
则表示拒绝该cookie。 特别支持
CookieSupport
类。public String checkCookieHeaderValue(String name, String value, boolean setHeader)
CookieHeaderValueInterceptor
checkCookieHeaderValue
in interface CookieHeaderValueInterceptor
null
则表示拒绝该cookie。public String checkStatusMessage(int sc, String msg)
StatusMessageInterceptor
checkStatusMessage
in interface StatusMessageInterceptor
null
则表示不设置status消息。public String checkRedirectLocation(String location)
RedirectLocationInterceptor
checkRedirectLocation
in interface RedirectLocationInterceptor
null
则表示拒绝该location。Copyright © 2006–2018 TinyGroup. All rights reserved.