Asked on StackOverflow but might be relevant here
Has anyone experienced the "A secret key is required to use CSRF" error when trying to host a flask app on a linode IP address? More context is in the link. This app runs fine and sends me emails in my local server, and shows the correct html pages at the IP address, but I can't even access the page that uses forms.
More info can be found here: [https://stackoverflow.com/questions/73979827/a-secret-key-is-required-to-use-csrf-linode-server-gunicorn-nginx-error-flask]
1 Reply
I'm by no means an expert with Flask, but I may have have some solutions from StackOverflow:
- python - "The CSRF session token is missing" when CSRF token is present in request - Stack Overflow
- Flask WTF CSRF session token missing, secret_key not found - Stack Overflow
- python - Flask-WTF: CSRF token missing - Stack Overflow
Each post contains slightly differing issues requiring slightly different solutions, so I hope this helps point you in the right direction. If you have already figured this out, I'd love to hear what you did so that you might be able to help anyone else who stumbles across this post.