Forum Discussion
Vincent_Power_9
Nimbostratus
Jun 07, 2005Rewriting a header inside RESPONSE_DATA
I have an application that uses its local server name when it builds a redirect URL during the authentication phase.
Example it sends back now
location: http://server1.atl.bluecr...
Vincent_Power_9
Nimbostratus
Jun 08, 2005I think I have it figured out, far this works the way I want.
when HTTP_RESPONSE {
set gmpHost "http://server1.atl.bluecross.ca:8080/"
set ssoHost "http://server2.atl.bluecross.ca:8080/"
set bigHost "https://bigtest1.atl.bluecross.ca/"
set location [HTTP::header location]
if { $location starts_with $gmpHost } {
regsub -all $gmpHost $location $bigHost newLocation
HTTP::header replace location $newLocation
} elseif { [HTTP::header location] starts_with $ssoHost } {
regsub -all $ssoHost $location $bigHost newLocation
HTTP::header replace location $newLocation
}
}
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