接口的使用
org.springframework.boot.web.servlet.server.CookieSameSiteSupplier
使用CookieSameSiteSupplier的程序包
-
org.springframework.boot.web.servlet.server中CookieSameSiteSupplier的使用
修饰符和类型方法说明static CookieSameSiteSupplier
CookieSameSiteSupplier.of
(Cookie.SameSite sameSite) Return a newCookieSameSiteSupplier
that always returns the givenCookie.SameSite
value.static CookieSameSiteSupplier
CookieSameSiteSupplier.ofLax()
Return a newCookieSameSiteSupplier
that always returnsCookie.SameSite.LAX
.static CookieSameSiteSupplier
CookieSameSiteSupplier.ofNone()
Return a newCookieSameSiteSupplier
that always returnsCookie.SameSite.NONE
.static CookieSameSiteSupplier
CookieSameSiteSupplier.ofStrict()
Return a newCookieSameSiteSupplier
that always returnsCookie.SameSite.STRICT
.default CookieSameSiteSupplier
Limit this supplier so that it's only called if the predicate accepts the Cookie.default CookieSameSiteSupplier
CookieSameSiteSupplier.whenHasName
(String name) Limit this supplier so that it's only called if the Cookie has the given name.default CookieSameSiteSupplier
CookieSameSiteSupplier.whenHasName
(Supplier<String> nameSupplier) Limit this supplier so that it's only called if the Cookie has the given name.default CookieSameSiteSupplier
CookieSameSiteSupplier.whenHasNameMatching
(String regex) Limit this supplier so that it's only called if the Cookie name matches the given regex.default CookieSameSiteSupplier
CookieSameSiteSupplier.whenHasNameMatching
(Pattern pattern) Limit this supplier so that it's only called if the Cookie name matches the givenPattern
.修饰符和类型方法说明void
AbstractServletWebServerFactory.addCookieSameSiteSuppliers
(CookieSameSiteSupplier... cookieSameSiteSuppliers) void
ConfigurableServletWebServerFactory.addCookieSameSiteSuppliers
(CookieSameSiteSupplier... cookieSameSiteSuppliers) AddCookieSameSiteSuppliers
to those that should be used to obtain theCookie.SameSite
attribute of any added cookie.修饰符和类型方法说明void
AbstractServletWebServerFactory.setCookieSameSiteSuppliers
(List<? extends CookieSameSiteSupplier> cookieSameSiteSuppliers) void
ConfigurableServletWebServerFactory.setCookieSameSiteSuppliers
(List<? extends CookieSameSiteSupplier> cookieSameSiteSuppliers) SetsCookieSameSiteSuppliers
that should be used to obtain theCookie.SameSite
attribute of any added cookie.