Forum Discussion
Gerald_Meese
Cirrus
Jan 11, 2018iRule - 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 HT...
Stanislas_Piro2
Cumulonimbus
Jan 11, 2018You can try this code:
when HTTP_REQUEST {
if {[HTTP::uri] starts_with "/internalURI"} {
set logindata [b64encode "username:password"]
HTTP::header replace Authorization "Basic $logindata"
} else {
HTTP::redirect "/internalURI"
}
}Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
