Modena_
Oct 27, 2017Nimbostratus
Change the 302 URL that APM sends back (the original URL requested by client)
Hi,
APM seems to work like this;
1) use goes to http://www.url.com/foo/bar
2) APM presents login screen, user authenticates
3) upon successfull authentication, APM sends a 302 back to the client with Location header http://www.url.com/foo/bar
I need to change the location in the 302 to something different based on an APM session variable. But leaving aside the APM session variable, it seems I'm unable to modify the 302 that APM is sending back.
I have spent way to long trying the likes of;
when CLIENT_ACCEPTED {
ACCESS::restrict_irule_events disable
}
when HTTP_RESPONSE {
log local0. [HTTP::header names]
if { [HTTP::status] == "302" and [HTTP::header "Location"] contains "wsignin" } {
HTTP::header replace "Location" "http://www.google.com"
}
}
log local0. [HTTP::header names] <-- this does NOT show any "Location" header, just "Content-Length Content-Type Expires ETag Server Date", however in the browser development tools I do see the Location header in the 302