I have deployed a Flask web app to a Digital Ocean droplet running Ubuntu 18.04. The web app is simply a landing page that has a single form that adds a visitor's email address to a Mailchimp mailing list.
The web app works perfectly in development, however the form submission does not work in production. Submitting the form just reloads the page. It does not submit the email address to the mailing list nor is the 'thank you' page displayed.
In development, I am using the default Flask WSGI server to directly access the web app (i.e. localhost:5000).
In production, I am using Nginx in conjunction with Gunicorn. As a sanity test, I ran the app using Flask's default WSGI server in production and it worked fine.
Aside from using Nginx and Gunicorn, the web app code and configuration (e.g. Mailchimp list id / api key) are identical across both environments.
What could be causing this problem?