S
S
SlimG2018-12-06 02:30:24
Spring
SlimG, 2018-12-06 02:30:24

Why is the JSESSIONID cookie not being set in storage?

There is a backend on Spring, using in particular Spring Security is spinning on localhost:8080. There is also a Vue CLI that runs on localhost:8081. I configured CORS access and allowed Credentials to be installed. 5c085cb6388d9713196533.png
When I try to authorize, I get a response with cookies, but they are not saved
5c085e2070550243517148.png5c085e2914ca9755716623.png5c085e5787448987780789.png
. At the same time, the user is on the back and a session is created
5c085ec0f0ece139479929.png
How to fix this? Need JSESSIONID cookie to access controllers.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
SlimG, 2018-12-06
@SlimG

It turned out to be the withCredentials parameter of the request using axios. It is required to set withCredentials: true in the request config
5c09139ce1585834080210.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question