helloflask / helloflask/bootstrap-flask
CSRF Token handling unclear
Open
form
- Dominant language
- SCSS
- Stars
- 1.2k
- Forks
- 193
- Avg merge
- 4m
- Merged PRs (30d)
- 3
Description
To get CSRF Token handling as outline in https://flask-dropzone.readthedocs.io/en/latest/advanced.html
I tried:
```python
# enable CSRF protection
self.app.config['DROPZONE_ENABLE_CSRF'] = True
```
```html
Dropzone.options.myDropzone.headers = {"X-CSRF-Token": "{{ csrf_token() }}"}
Upload Form
{{ render_form(upload_form) }}
{{ dropzone.create(action=url_for('test_upload')) }}
{{ dropzone.config() }}
```
but still i get:
400 Bad Request
Bad Request
The CSRF token is missing.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.