From 881977e8e3d1016c19d0e6d76be74cd28ae2ccc0 Mon Sep 17 00:00:00 2001 From: t123yh Date: Thu, 24 Aug 2017 10:36:00 +0800 Subject: [PATCH] Introduce a way to add CSRF manually. --- static/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/script.js b/static/script.js index ad77f57..85e02c7 100644 --- a/static/script.js +++ b/static/script.js @@ -41,7 +41,7 @@ $(function () { form.submit(); }); - $('form').each(function () { + $('form').not('.have-csrf').each(function () { this.action = addUrlParam(this.action || location.href, '_csrf', document.head.getAttribute('data-csrf-token')); }); });