Forum Discussion
Sandeep_Krishna
Nimbostratus
Feb 20, 2014F5 irule intercept and configured JSON response question
Hi - I have a question on F5 irules. I need F5 to intercept a request to a weblogic server and respond with a JSON object. I have the following irule to perform this action. However the F5 intermitte...
Sandeep_Krishna
Nimbostratus
Feb 25, 2014The request uri is always /xxx/yyyy/SOMETHING. We get the below mentioned JSON error response on first attempt but subsequent attempts which also has the same request uri somehow bypasses this F5 irule and is served by the weblogic server. Thats the reason the JSESSIONID is attached to the response headers,
I have simplified the code as well as added some formatting. Please provide your inputs.
***************************************************************************************************************
when CLIENT_ACCEPTED {
set rewrite_response 1
}
when HTTP_REQUEST {
if { ([string tolower [HTTP::uri]] starts_with "/xxx/yyyy") && $rewrite_response==1 } {
set json "{"error": "true"}"
HTTP::respond 200 content $json "Content-Type" "application/json"
unset rewrite_response
return
}
}
***************************************************************************************************************
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