nginx对https的配置,nginx解决post请求被请求两次的问题
生活随笔
收集整理的這篇文章主要介紹了
nginx对https的配置,nginx解决post请求被请求两次的问题
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
前置條件:
將證書放在:nginx目錄下的cert目錄中,其中證書有:.pem和.key文件
nginx解決post請求被請求兩次的問題
if ($request_method = 'OPTIONS') {add_header Access-Control-Allow-Origin *;add_header Access-Control-Allow-Credentials true;add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS';add_header 'Access-Control-Allow-Headers' 'Origin,X-Requested-With,Content-Type,Authorization,Accept, No-Cache, If-Modified-Since,Last-Modified, Cache-Control, Expires, X-E4M-With,X-Ca-Key,X-Ca-Signature,X-Ca-Timestamp,X-Ca-Nonce,Content-MD5,X-Ca-Stage,X-Ca-Signature-Headers,C-User-ticket';return 204;}總結
以上是生活随笔為你收集整理的nginx对https的配置,nginx解决post请求被请求两次的问题的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 回收宝获阿里巴巴C1轮融资 旗下多个平台
- 下一篇: 支付宝提前还款影响信用吗