Forum Discussion

ottleydamian's avatar
6 years ago

HTTP Response rewrite

I trying to modify text in the data portion of a packet but I'm not having success. The content-type does state text as one of the types, I have the default stream profile attached to the VIP. So I'm not sure if my code is incorrect or the F5 cannot read the response. I'm trying to change mywebsite.plate.com to abclabs.facts.net

 

If I should use something other than a stream profile tell me.

 

Client Request:

  • POST /xi/ajax/whatever... HTTP/1.1

 

Server Response:

 

My code:

when HTTP_RESPONSE {
  # Check if response type is text
  if {[HTTP::header value Content-Type] contains "text"}{
  
    # Replace mywebsite.plate.com with abclabs.facts.net
    STREAM::expression "[email protected]@"
 
 
    # Enable the stream filter for this response only
    STREAM::enable
    
	}
}