weixin_33716154 2016-07-28 11:42 采纳率: 0%
浏览 35

在ajax请求上的CSRF令牌

I have a registration form with hidden token input. There is also username field & whenever user input any data to username field , it sends ajax request to server & checks if username already exists. So the ajax request is sent multiple times.
I know how to update token, my question is there any need to update token for this simple request?is it worth updating token for every ajax request?
Thanks

  • 写回答

1条回答 默认 最新

  • Memor.の 2016-07-28 12:36
    关注

    It depends on the framework you are using. If the framework expires the token after some time then you will have to update the token.

    You can update the token after some time before it gets expired.

    And if the token does not get expired then there is no need to update the token.

    评论

报告相同问题?