Forum Discussion
Disable HTTP_RESPONSE if a specific uri is requested
I am trying to create an exception to a stream rule on HTTP_RESPONSE if the request comes in to a specific URI.
My current iRule is:
when HTTP_RESPONSE {
Check if response type is text
if { [HTTP::uri] equals "/otcs/llisapi.dll?func=ngd.ucroot"}
STREAM::disable
elseif {[HTTP::header value Content-Type] contains "text"}{
Replace http:// with https://
STREAM::expression {@http://rambusdocsdev.rambus.com@https://rambusdocsdev.rambus.com@}
Enable the stream filter for this response only
STREAM::enable
}
Check if server response is a redirect
if { [HTTP::header is_redirect]} {
Log original and updated values
log local0. "Original Location header value: [HTTP::header value Location],\
updated: [string map -nocase "http:// https://" [HTTP::header value Location]]"
Do the update, replacing http:// with https://
HTTP::header replace Location [string map -nocase "http:// https://" [HTTP::header value Location]]
}
}
I want to add This,
when HTTP_REQUEST {
if { [HTTP::uri] equals "/otcs/llisapi.dll?func=ngd.ucroot"} {Some command to stop processing
}
I've tried using the event command, but I can't seem to get the syntax correct.
Thanks,
Gladney
- hoolioCirrostratusHi Gladney,
- Gladney_7700Historic F5 AccountHi Aaron,
Recent Discussions
Related Content
* 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