For new chrome update I need to set explicitly the Samesite attribute in cookie in JSESSIONID is there anyway to set that Attribute in vaadin 14.
Is anything possible with VaadinServiceInitListener? I have a class extended with it.
Any Response will be highly Appreciable.
I Have tried to add the cookie following way but dosen't get add in JSESSIONID
@SpringComponent
@Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public class ConfigureAdvocateUIServiceInitListener implements VaadinServiceInitListener {
/**
*
*/
private static final long serialVersionUID = 1L
@Autowired
private I18N i18n;
@Override
public void serviceInit(ServiceInitEvent event) {
event.getSource().addUIInitListener(uiEvent -> {
VaadinResponse currentResponse = VaadinService.getCurrentResponse();
currentResponse.setHeader("Set-Cookie", "key=value; HttpOnly; SameSite=strict");
});
}