By amigoni
I can’t seem to get post data to come through on my newly setup server. Sorry I am a newbie at this. This is my setup for nginx. I can reach the server an not get an error on the endpoints but data somehow doesn’t come through works fine locally.
Could it be something with the firewals?
map $http_upgrade $connection_upgrade { default upgrade; ‘’ close; }
server {
listen 80;
listen [::]:80;
server_name mydomain.com www.mydomain.com;
location / {
proxy_pass http://localhost:8000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
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!
Greetings!
I do not personally write code with this language, so it may be possible that someone else can come along and provide a more detailed answer than myself. However, I do feel qualified to answer at a high level.
If Nginx captures the POST data and is configured to reverse proxy to the node app, then I believe you can safely identify the node app as the point that needs to be reviewed. If you can code in verbose logging to the app, this may allow you to see what is coming in and how it is interpreting it. It won’t be firewall, so you can at least narrow down the stage at which this occurs.
If it never gets caught or logged by Nginx, then I would assume the browser is not sending the data at all, and perhaps i would try either using curl or a different browser to test.
Jarland
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.