flask-wtf
flask-wtf copied to clipboard
Improve CSRF Documentation
This update extends the documentation regarding CSRF protection in the library. Specifically, it provides additional insights into the 'csrf' input name configuration for Non-FlaskForms in preventing the common "CSRF token is missing." Users can now better understand the implication of the WTF_CSRF_FIELD_NAME
config.
Additionally, a new example has been included in the JavaScript section that demonstrates how to send the 'csrf_token' as a Jinja2 variable (to the backend) with the Fetch API using a Vanilla JavaScript example. This example shows the proper implementation of CSRF protection when working with the Fetch API.