Forum Discussion
Marvin_129795
Apr 03, 2019Nimbostratus
Collect and resend cookie headers and values in 307 POST redirect
Hi All,
I am working on a solution to trigger a APM access policy logout and afterwards send the POST request with data and headers to the external website. The reason why I do this is quiet comple...
Kai_Wilke
Apr 03, 2019MVP
Hi Marvin,
you could read the Cookie-Header of the logout request, URI encode the entire cookie header value and append it to the existing
[HTTP::uri]
of the logout request.
when ACCESS_ACL_ALLOWED {
if { [HTTP::path] equals "/logmeout" } then {
log local0. "logout requested from IP \"[IP::client_addr]\" URI \"[HTTP::uri]\" query \"[HTTP::query]\" cookies \"[HTTP::header value "Cookie"]\""
ACCESS::session remove
ACCESS::respond 307 Location "HTTPS://myredirectwebsite/?[join "[HTTP::query] cookies=[URI::encode [HTTP::header value "Cookie"]] referer=[URI::encode [HTTP::header value "Referer"]]" "&" ]"
}
}
Cheers, Kai
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