I just set up my production environment for the Flask app I\'ve been developing.
This stack is:
Windows Server 2012 R2
Hyper-V VM
- Running Ubuntu 14
Basically I had this in my development config.py file:
SERVER_NAME = 'localhost:5000'
When I put the app on the production environment, I had to change it to:
SERVER_NAME = '192.168.1.66'
for the app to show up at all. But in the end I had to comment it out altogether. From my research it's only necessary when you're putting the app on a subdomain, which I am not.
If anyone has any more insight into why this would cause CSRF token invalidation, I'd love to hear it.. I've been unable to track this down any further. So for now, I've removed it altogether.