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

后端 未结 6 1156
孤独总比滥情好
孤独总比滥情好 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 20:49

    I had similiar issue but only with Chrome, Firefox was working. I noticed that Chrome was adding an Origin parameter in the header request.

    So in my nginx.conf I added the parameter to avoid it under location/ block

    proxy_set_header Origin "";
    

提交回复
热议问题