Spring Boot application runs on https://localhost:8080 and front-end (Angular) app runs on https://localhost:4200. On each request new JSESSIONID gets set/created as if HTTP session engine does not recognize JSESSIONID it has just set for previous request. But when I start serving front-end app as static content from Spring Boot app (which means same port for Angular app) everything works fine.
UPDATE 1: so far I have tracked that this happens because Request object get recycled because this code return false

UPDATE 2: I now see that "cookie" header like this one is not present in the request when font-end runs on different port.
cookie = SLG_G_WPT_TO=en; SLG_GWPT_Show_Hide_tmp=undefined; SLG_wptGlobTipTmp=undefined; JSESSIONID=6C59D1FE6310EE1E141FD96236D9218A


I overlooked that even though the browser showed me (in
Cookiestab) thatJSESSIONIDcookie was present it actually was not sent with the request. I did not notice thatCookieheader was not present in the requests. I am adding screenshot where a)Cookiestab is present and if opened showsJSESSIONIDwhich gave me the idea that the cookie is being sent and b) where you can see thatCookieheader is present in the correct request:Why
but HTTP interceptor's registration was commented in the AppModule:

Cookieheader was not present? Because even though the configuration forCORSwas correct onAngularside: