Gerald_Meese
Jan 18, 2018Cirrus
iRule - Do HTTP::redirect while preserving the POST method
Hello,
I'm using the following iRule to do a redirect to a specific URI :
when HTTP_REQUEST {
if {[HTTP::uri] starts_with "/internalURI"} {
set logindata [b64encode "username:password"]
HTTP::header replace Authorization "Basic $logindata"
} else {
HTTP::redirect "/internalURI"
}
The application owner noticed that the POST request (SOAP payload) is transformed in a GET when the F5 sends the traffic to the backend.
I read that this is due to the redirected, I found out info to solve that issue whith a HTTP::response 307 but I'm wondering how to fix that with an HTTP::redirect.
Any help would be appreciated 🙂 Thanks !
Gerald