I have a big problem here. Umbraco Forms is using AntiForgeryToken, which ofcause is very safe, but plays bad with OutputCache, because the token isn't refreshed on each page load.
Can I do something about it?
Can I stop Umbraco Forms from using the AntiForgeryToken if nothing else works?
I cannot just remove the token from the form.cshtml. If I do I get this server error, which is logical:
The required anti-forgery form field "__RequestVerificationToken" is not present.
AntiForgeryToken and page cache
Hi Guys,
I have a big problem here. Umbraco Forms is using AntiForgeryToken, which ofcause is very safe, but plays bad with OutputCache, because the token isn't refreshed on each page load.
Can I do something about it? Can I stop Umbraco Forms from using the AntiForgeryToken if nothing else works?
I cannot just remove the token from the form.cshtml. If I do I get this server error, which is logical: The required anti-forgery form field "__RequestVerificationToken" is not present.
Any ideas?
Hi Rune,
Did you know that you can set the AntiForgeryToken to false.
Try to see this documentation.
https://our.umbraco.org/documentation/Add-ons/UmbracoForms/Developer/Configuration/#enableantiforgerytoken
Hope this helps,
/Dennis
AAAAAH Thankyou Dennis. I knew there had to be somekind of settings for it, but could'nt find it.
That will certainly do the trick.
My other plan is to lazy load the forms with ajax, and see if the token works then. That will go around the page cache and might just work.
/Rune
is working on a reply...