Answer the question
In order to leave comments, you need to log in
How to extend the lifetime of a REST Cookie?
The site has a part where there is a small SPA and it works on custom REST API routes. And the problem is that if the user is idle for some time and does not send requests, then in the end, once again, when accessing the api, he will receive 403, rest_cookie_invalid. Helps to refresh the page. How to deal with it?
Answer the question
In order to leave comments, you need to log in
You enclose words in brackets like this (\w+)\[(\w+)\](\w+) and then you get 3 groups, each of which has one word from your example
For example, like this: ([^\[]+)\[([^\]]+)\](.+)
More:
([^\[]+)
- any character except " [
"\[
- actually " [
"([^\]]+)
- any character except " ]
"\]
- closing bracket(.+)
- all the restDidn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question