public class Hsts extends Object
| 构造器和说明 |
|---|
Hsts() |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
getEnabled()
返回是否启用 Hsts
|
boolean |
getIncludeSubDomains()
返回此规则是否适也用于该网站的所有子域名
|
Class<? extends org.springframework.security.web.util.matcher.RequestMatcher> |
getMatcher()
返回 Request 匹配器类
|
long |
getMaxAge()
返回缓存时间,在浏览器收到这个请求后的 maxAge 秒的时间内凡是访问这个域名下的请求都使用HTTPS请求
|
boolean |
getPreload()
返回是否预加载 HSTS
|
boolean |
isEnabled()
返回是否启用 Hsts
|
boolean |
isIncludeSubDomains()
返回此规则是否适用于该网站的所有子域名
|
boolean |
isPreload()
返回是否预加载 HSTS
|
void |
setEnabled(boolean enabled)
配置是否启用 Hsts
|
void |
setIncludeSubDomains(boolean includeSubDomains)
设置此规则是否也适用于该网站的所有子域名
|
void |
setMatcher(Class<? extends org.springframework.security.web.util.matcher.RequestMatcher> matcher)
设置 Request 匹配器类
|
void |
setMaxAge(long maxAge)
设置缓存时间,设置在浏览器收到这个请求后的 maxAge 秒的时间内凡是访问这个域名下的请求都使用HTTPS请求
|
void |
setPreload(boolean preload)
设置是否预加载 HSTS
|
String |
toString() |
public boolean isEnabled()
public boolean getEnabled()
public void setEnabled(boolean enabled)
enabled - 是否启用 Hstspublic Class<? extends org.springframework.security.web.util.matcher.RequestMatcher> getMatcher()
public void setMatcher(Class<? extends org.springframework.security.web.util.matcher.RequestMatcher> matcher)
matcher - Request 匹配器类public long getMaxAge()
public void setMaxAge(long maxAge)
maxAge - 缓存时间(单位:秒)public boolean isIncludeSubDomains()
public boolean getIncludeSubDomains()
public void setIncludeSubDomains(boolean includeSubDomains)
includeSubDomains - 此规则是否也适用于该网站的所有子域名public boolean isPreload()
public boolean getPreload()
public void setPreload(boolean preload)
preload - 是否预加载 HSTSCopyright © 2022 buession.com Inc.. All rights reserved.