httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vieri Di Paola <vieridipa...@gmail.com>
Subject [users@httpd] Request Methods GET and POST through Reverse Proxy
Date Tue, 14 Jan 2020 13:36:46 GMT
Hi,

On my client browser I see that POST requests are properly sent when
using this reverse proxy configuration:

        TraceEnable off
        ProxyRequests Off
        ProxyPass / http://backend:8080/
        ProxyPassReverse / http://backend:8080/
        ProxyPreserveHost On

Request URL: https://reverse_proxy:50443/2/security/validUser?username=user
Request method: POST
Status code: 200 OK

However, this other configuration has a different effect on the backend service:

        TraceEnable off
        ProxyRequests Off
        RewriteEngine On
        RewriteRule ^/2/(.*)$ https://%{SERVER_NAME}/rp/1/2/$1
        ProxyPass /rp/1/ http://backend:8080/
        ProxyPassReverse /rp/1/ http://backend:8080/
        ProxyPreserveHost On

Request URL: https://reverse_proxy/2/security/validUser?username=user
(note that the request URL has not been rewritten to
https://reverse_proxy/rp/1/2/security/validUser?username=user)
Request method: POST
Status code: 302 Found
Location: https://reverse_proxy/rp/1/2/security/validUser?username=user
(this is the right URL!)

However, the next transaction is:

Request URL: https://reverse_proxy/rp/1/2/security/validUser?username=user
Request method: GET
Status code: 405 Method Not Allowed

The backend server requires a POST, not a GET.

What can I try?

Vieri

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message