A
A
Artyom2020-10-02 18:01:44
PHP
Artyom, 2020-10-02 18:01:44

How to watch PHPSESSID value change (Vue, axios)?

Hello! I came across such a problem. In my application, after some time, the value of PHPSESSID is changed / deleted and because of this, the user is thrown out of the system. How can one track the change in PHPSESSID through axios interceptors and, depending on the result, carry out some further manipulations?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander, 2020-10-02
@z80b

It seems not. PHPSESSID can be found in cookies. axios can pass cookies, but it doesn't have to keep track of them.

A
Aetae, 2020-10-04
@Aetae

Well, you can put a parameter withCredentials: trueand read the cookietitle. But it will make each query bolder. In a good way, the session should not go rotten while there are requests.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question