Forum Discussion
mikey_webb
Cirrus
May 30, 2019iRule to intercept request and respond to client with content
Please help Require an iRule to intercept a specific URI pattern and when the pattern is received instead of going to the pool return an HTTP response code 200 back with the following content...
Lee_Sutcliffe
Nacreous
May 30, 2019Try this
when HTTP_REQUEST {
set message "{\"result\":null,\"errors\":[],\"warnings\":[],\"hasErrors\":false,\"hasWarnings\":false}"
if {[HTTP::uri] equals "/my/path"} {
HTTP::respond 200 -version 1.1 content $message noserver "Content-Type" "application/json" "Connection" "close"
}
}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
