Forum Discussion
sanjai_126162
Nimbostratus
Aug 22, 2016irule to strip the uri after apm completion it has to include the lengthy uri
iRule that will capture the HTTP URI if it is larger than 1098 bytes, then strip the HTTP URI from the HTTP request that is sent to the APM. Once the Access Policy evaluation is completed and the BI...
Stanislas_Piro2
Cumulonimbus
Aug 24, 2016Hi,
you can try this irule (not tested):
when HTTP_REQUEST {
if {![HTTP::cookie exists "MRHSession"] && [string length [HTTP::uri]] >=4096} {
binary scan [sha1 [HTTP::uri]] H* output
table add -subtable APMURI $output [HTTP::uri] 600
HTTP::uri "/encodeduri/$output"
}
}
when ACCESS_POLICY_COMPLETED {
if { ([ACCESS::policy result] equals "allow")} {
set landinguri [ACCESS::session data get "session.server.landinguri"]
if {$landinguri starts_with "/encodeduri/"} {
set encodeduri [string map { "/encodeduri/" ""} $landinguri]
ACCESS::respond 302 Location [table lookup -notouch -subtable APMURI $encodeduri] Connection close
}
}
}
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