I am trying to submit a form on a Flask app using curl. Unfortunately, I keep running into the "CSRF token missing" error.
I tried:
curl -X POST --form csrf_token=token --form data=@file.txt --form submit=submit {url} -v
I used a csrf_token
from the app while I had it open in a browser. I also looked at https://flask-wtf.readthedocs.org/en/latest/csrf.html and tried to set X-CSRFToken
in the header but still got the same error. Any suggestions for what is the correct way to use curl to feed the token to the flask app?