Forum Discussion
JoeK_10405
Nimbostratus
Jan 16, 2009Intercept client request to fix broken app
Breakfix Needed. Client requests causes app to loop and eat all resources, and fix will take some weeks to migrate through to production. So in the meantime, I need to leverage/show off iRules in our ...
JoeK_10405
Nimbostratus
Jan 16, 2009Updated iRule per CharlesCS suggestion:
when HTTP_REQUEST {
if {[HTTP::method] equals "OPTIONS" } {
log local0. "OPTIONS method detected"
if {[HTTP::uri] equals "/xxx/authentication/AuthenticationServlet"} {
log local0. "uri equals /xxx/authentication/AuthenticationServlet!"
if {[HTTP::version] eq "1.1" } {
log local0. "intercept response !"
HTTP::respond 200 "Allow" "GET, HEAD, POST, TRACE, OPTIONS"
}
}
}
}
And following CURL output:
curl -v -X OPTIONS http://xxx/xxx/authentication/AuthenticationServlet
* About to connect() to xxx port 80
* Trying 10.0.0.26... connected
* Connected to xxx (10.0.0.26) port 80
> OPTIONS /xxx/authentication/AuthenticationServlet HTTP/1.1
> User-Agent: curl/7.15.3 (i686-redhat-linux-gnu) libcurl/7.15.3 OpenSSL/0.9.7l zlib/1.1.4
> Host: xxx
> Accept: */*
>
< HTTP/1.0 200 OK
< Allow: GET, HEAD, POST, TRACE, OPTIONS
< Server: BigIP
* HTTP/1.0 connection set to keep alive!
< Connection: Keep-Alive
< Content-Length: 0
* Connection 0 to host xxx left intact
* Closing connection 0
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