Gerald_Meese
Jan 11, 2018Cirrus
iRule - Combine HTTP::redirect and Basic Auth in HTTP header
Hello,
I'm trying to adapt an iRule that would combine the redirect to a specific URI on the backend server, while sending Basic Authentication in an HTTP header to that backend server :
when HTTP_REQUEST {
set logindata [b64encode "username:password"]
HTTP::redirect "/internalURI"
HTTP::header replace Authorization "Basic $logindata"
}
Both commands work well separately, and I believe I understand where the problem is (the redirect sends a new path to the client while the HTTP header is added into the traffic to the backend) but I can't figure out how to get this to work.
Thanks in advance for your help !
Kind regards,
Gerald