POST request not allowed - 405 Not Allowed - nginx, even with headers included

后端 未结 6 1159
孤独总比滥情好
孤独总比滥情好 2020-11-29 20:23

I have a problem in trying to do a POST request in my application and I searched a lot, but I did not find the solution.

So, I have a nodeJS application and a websi

6条回答
  •  不知归路
    2020-11-29 21:10

    This is the real proxy redirection to the intended server.

    server {
      listen          80;
      server_name     localhost;
    location / {
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-NginX-Proxy true;
        proxy_pass http://xx.xxx.xxx.xxx/;
        proxy_redirect off;
        proxy_set_header Host $host;
    
      }
    }
    

提交回复
热议问题