Forum Discussion
Akhilesh_128432
Nimbostratus
Mar 06, 2016My F5 Irule- Need some help
Below are some of the content of our HTTP body and we are trying to parse and filter out auth token from HTTP response for persistence.we have added below irule.
{"username":"XStore24User","auth...
nitass
Employee
Mar 06, 2016is this something below like this,
when HTTP_REQUEST { if {[HTTP::header exist "Accept-Encoding"]} { HTTP::header remove "Accept-Encoding" "" } }
you can just remove it (no need to check if header exists before).
another way is to use header-erase setting in http profile.
Akhilesh_128432
Nimbostratus
Mar 06, 2016Thanks for your quick response.
I have updated those entries in my Irule. pasting below. Could you please confirm.
when HTTP_RESPONSE
{ if {[HTTP::header exist "Accept-Encoding"]} { HTTP::header remove "Accept-Encoding" "" } }
when HTTP_RESPONSE {
trigger collection for up to 1MB of data
if {([HTTP::header exists "Content-Length"]) && ([HTTP::header "Content-Length"] <= 1000000)}{
set content_length [HTTP::header "Content-Length"]
} else {
set content_length 1000000
}
HTTP::collect $content_length
}
when HTTP_RESPONSE_DATA {
if {[HTTP::payload] contains "authToken"} {
set authToken [findstr [HTTP::payload] "authToken" 12 "36"]
persist add uie $authToken
}
HTTP::release
}
Also could you please share couple of dev central article to configure erase setting in HTTP Profile.
Thanks,
Akhi
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