use of org.springframework.boot.web.server.Cookie in project spring-boot by spring-projects.
the class WebSessionIdResolverAutoConfiguration method initializeCookie.
private void initializeCookie(ResponseCookieBuilder builder) {
Cookie cookie = this.serverProperties.getReactive().getSession().getCookie();
PropertyMapper map = PropertyMapper.get().alwaysApplyingWhenNonNull();
map.from(cookie::getDomain).to(builder::domain);
map.from(cookie::getPath).to(builder::path);
map.from(cookie::getHttpOnly).to(builder::httpOnly);
map.from(cookie::getSecure).to(builder::secure);
map.from(cookie::getMaxAge).to(builder::maxAge);
map.from(getSameSite(cookie)).to(builder::sameSite);
}
Aggregations