To guard yourself against CSRF, use the one-use token approach you use in your habit of verifying form posts.
为了保护您免受CSRF攻击,需要使用在检验表单post时使用的一次性标记方法。
For example, the following Gatekeeper code creates a multi-use token with specific usage limits (from the documentation).
例如,以下的Gatekeeper代码使用指定使用限制来创建一个多重使用标记(文档来源)。
One technique you can use is a single-use token, which does not make it impossible to spoof your forms but does make it a tremendous hassle.
您可以使用一种一次性使用标记,虽然这种技术仍然不能确保表单绝对安全,但是会使表单欺骗更加困难。
应用推荐