Why is the session of the two requests of spring different?

Why the sessionId printed out from my two requests is not the same, which makes me unable to keep my login status.
I logged in in login.html, and then issued the

of the get_current_user.do request in index.html
Jul.09,2022

is likely to be a cross-domain request problem

  1. browsers do not bring cookie to the background across domains for security, which can be verified by web requests to see if cookie is brought.

clipboard.png

check whether the request-header requested by the browser has the parameter cookie

  1. in the browser without cookie, calling getSessionId will new a new one, so each id is different
Menu