Hello, I am new to the F5 iRules. I need to remove all the values of '<pan>' in the 'HTTP::payload', either remove all the tags '<pan>' too. The structure is as below. This '<pan>' can exsit o...
What I want to do is the second one as you mentioned. I have tried 'html content' with this article https://support.f5.com/csp/article/K99872325, it doesn't work. It seems that 'html content profile'is only for modify HTML content sent in responsesfrom the back-end servers.
What I want is to modify the request. Do you have any suggestion about that?
By the way, the request is in the format xml SOAP as below:
I've tried my side with graphic configuration stream as below:
source I put '<pan>(.*\?)<\\/pan>', and nothing for target. chunk deactivated.
and then activate this stream profile dans virtuel server like this:
After that I checked the data receieved on the server side, it doesn't change anything. There is still 'pan'. Do I miss anything?
PS: 'plainPanRemoved' is done by our app to remove sensitive data.
I also tried with iRules, the back-end throws directly 'Error reading XMLStreamReader'.
when HTTP_REQUEST {
# Verify Content-length, POST, URI
if { [HTTP::header exists Content-length] and [HTTP::method] equals "POST" and [string tolower [HTTP::uri]] contains "/endPointName"}{
# Verify if the request is CreateWalletReq
if { [HTTP::payload] contains "<CreateWalletReq"} {
# Remove PAN
STREAM::expression {@<pan>(.*\?)<\\/pan>@@}
STREAM::enable
}
}
}
when HTTP_RESPONSE {
STREAM::disable
}