Answer the question
In order to leave comments, you need to log in
Set beforeSend for all ajax requests?
Hello everyone, in different frameworks, csrf tokens are issued for protection, which the client must send to the server, and if it does not do this or the token is invalid, the request is rejected. After some time, the token goes bad and the requests stop coming. I decided to try to get a new token before each request, is it possible to somehow set a function that will receive a new token for all ajax requests (jQuery)?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question