為什麼Nginx不直接轉送POST請求而是轉送302

為什麼Nginx不直接轉送POST請求而是轉送302

我想使用 jmeter 透過 Nginx 代理程式測試 Apache 伺服器。 Get 請求運作正常,但對於 POST 方法,Nginx 回應 302 然後重定向,但 jmeter 沒有重新傳送請求,而是將方法變更為 GET。為什麼 Nginx 不像客戶端那樣直接轉發請求並回傳回應?有什麼辦法可以解決嗎?

我的應用程式使用rest/json api 來呼叫。

        location /api {

            proxy_pass https://testserver;

            proxy_set_header          Host            $host;
            #proxy_set_header          X-Real-IP       $remote_addr;
            #proxy_set_header          X-Forwarded-For $proxy_add_x_forwarded_for;


    }

相關內容