Forums

CSRF error

I get this while calling a remote API from my website. This does not happen on localhost. Must be some PythonAnywhere security, but I'm not sure why.

Forbidden (403) CSRF verification failed. Request aborted. More information is available with DEBUG=True.

we're not doing anything special with respect to csrf security that would affect users' web apps.

One possiblility is that it's to do with different versions of your web framework on your pc and on pythonanywhere? are you using flask? or another framework? what version? Maybe it would be best to use a virtualenv,, to get the same version as on your pc? https://www.pythonanywhere.com/wiki/Virtualenvs

yes, i'm using flask 0.10.1 and the default on pythonanywhere seems to be 0.9 maybe i should try to downgrade or setup a virtual env...

Using a virtualenv would be a good idea. Let us know if that helps?