http response
3 TopicsiRule to replace content of the location header on HTTP Responses
I'm trying to create an iRule that will detect if a web server is sending it's private IP address in the location header on it's responses. The logic is to read the location header in the responses, detect if the private IP addresses of the servers are included on them and replace the content of the location header to the website's URL, leaving everything else intact. This is the initial code I came up with. Should this work? Any better suggestions? when HTTP_RESPONSE { if { ( [HTTP::header Location] contains "10.0.0.11" ) || ( [HTTP::header Location] contains "10.0.0.12" ) } { [HTTP::header Location] replace "www.mywebsite.com" } }2KViews0likes3CommentsiRule When HTTP Response Behavior
I'm trying to do a thing where if the F5 detects that the pool does not have active members, it will redirect the users to a specific URL but in addition it will also delete a session cookie. I learnt from another question here on DevCentral that the HTTP::cookie remove needs to be used in the HTTP Response section for it to remove cookies from the user's browser. So the question is, would the HTTP::respond command triggered from the iRule also trigger the when HTTP_RESPONSE section of the same iRule? when HTTP_REQUEST { ... if { [active_members http_pool] = 0 } { HTTP::respond 302 noserver location "https://www.mywebsite.com" set pool_status "nomember" } } when HTTP_RESPONSE { if { $pool_status eq "nomember" } { HTTP::cookie remove "sessionID" } }281Views1like2Commentsirule for change the url and port
dear all i have customer who had proxy before, and the ideas is change the function of the proxy. unfortunately i think we must use irule to do that. here are the requirement : we need to replace the http with https, also if it contains port 8080 in the URL we must remove it. i dont know whether it used on the http response or request they need to edit http response content/body, if mime type are application/excel text/html text/plain, they need subtitute the http to https and remove port 8080 i hope all of you can help me solving this problem thank you617Views0likes1Comment