一篇快速解决Nginx Post请求405 (Not Allowed)异常的方案
生活随笔
收集整理的這篇文章主要介紹了
一篇快速解决Nginx Post请求405 (Not Allowed)异常的方案
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
原因在上一篇提到Failed to load resource: the server responded with a status of 405 (Not Allowed)
少說話上代碼:
```javalocation /api/ {proxy_pass http://172.0.0.1:8085;proxy_redirect off;proxy_set_header Host $http_host;proxy_set_header X-Real-IP $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;} 可以保證post請求變成get時,重定向到后臺請求的參數不會丟失。總結
以上是生活随笔為你收集整理的一篇快速解决Nginx Post请求405 (Not Allowed)异常的方案的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 计算机会显示机械硬盘丢失,Win10机械
- 下一篇: 阿里云SSL数字证书Nginx配置部署