Forum Discussion
Abhi_001
Nimbostratus
2 years agoHelp with iRule to mask/hide User Personal Information in HTTP Response
I am trying to create iRule to mask or entirely hide the User Personal Information in HTTP Response Below is the sample HTTP response -: HTTP/1.1 200 OK
Cache-Control: private, max-age=0
Con...
Abhi_001
Nimbostratus
2 years agoGot it solved with below iRule code -:
when HTTP_RESPONSE {
set clen [HTTP::header Content-Length]
HTTP::collect $clen
}
when HTTP_RESPONSE_DATA {
regsub -all {<PhoneNumber>(.*?)</PhoneNumber>} [HTTP::payload] {<PhoneNumber>********</PhoneNumber>} fixeddata
log "Replacing payload with new data."
HTTP::payload replace 0 $clen $fixeddata
HTTP::release
}2 years ago
Hi Abhi_001 ,
That's good.
Please mark your answer as an accepted solution , to make it easy for F5 users in all over the world to reach to the solution easly at similar cases 🙂