Report this

What is the reason for this report?

Cannot make POST request

Posted on March 19, 2021

Connected Tutorial(This question is a follow-up to this tutorial):

How To Serve Flask Applications with Gunicorn and Nginx on Ubuntu 20.04

I followed the exact same steps as mentioned in the tutorial. GET requests work both on browser and Postman but when I make a POST request using Postman it says method not allowed although I have defined a route for POST request in my flask app.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi there,

What I could suggest is checking your Nginx error log for some more information on what the problem could be caused by:

tail -100 /var/log/nginx/error.log

Another thing that I could suggest is, if you have a domain name with an SSL certificate, make sure that you specify https:// in Postman as if you have a HTTP to HTTPS redirect it could cause that problem that you are seeing.

Regards, Bobby

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.