Problem:
We are encountering 500 error when submitting Episerver forms occasionally.
The exact 500 error is anti-forgery token is missing.
We have confirmed that the form submission is allowed for anonymous user.
Relative Package version:
Episerver.Contentdeliveryapi.forms v 2.6.1
Episerver.form V 4.25
Some details to note:
Our content site is powered by react, thus we followed the guide on https://world.episerver.com/documentation/developer-guides/content-delivery-api/content-delivery-api-and-episerver-forms/.
We are able to render the form successfully using data provided by content delivery api and javascript.
After some debugging, I noticed that the content delivery api is returning a set cookie header for __requestVerficationtoken.
Occasionally the value of the cookie is missing, and this is causing 500 error on form submit.
If we get a correct response from content delivery API, we are able to submit the form without any error.
Does anyone ran into this problem before? And is there any workaround on this ?