Forum Discussion
Gerardo_Garcia_
Jul 09, 2008Nimbostratus
Excluding some urls for the STREAM conversion
I have the following iRule that converts http to https for external users only as defined on the internal_net
However, when the page contains calls to google.com, amazon.com, ebay.com i...
Onettoster_3403
Nov 21, 2017Nimbostratus
Hi everybody, I been copying and pasting the last irule shown here, because I had a similar issue. First I had to modify that irule becouse gave to me some problems whit the syntax and other stuff. I'm new on f5 so I starting to google it how to fix it and finally I got this:
when RULE_INIT {
Lista de los domininios que NO se reemplazaran
set static::listado [ list /http://www.fapesp.br ]
}
when HTTP_RESPONSE {
Desabilitar el filtro stream
STREAM::disable
Check if response type is text
if {[HTTP::header value Content-Type] contains "text"}{
log local0. "[IP::client_addr]:[TCP::client_port]: Setting stream expression, enabling filter"
Remplazar cualquier http:// por https://
STREAM::expression {@http://*@}
Habilitar el filtro stream solo si corresponde
STREAM::enable
}
}
when STREAM_MATCHED {
Revisar if el string actual obtenido por el filtro stream esta en la lista de dominios a conservar
if { [lsearch -glob $static::listado [string tolower [STREAM::match]] ] } {
log local0. "[IP::client_addr]:[TCP::local_port]: found [STREAM::match], but did not modify it."
} else {
log local0. "[IP::client_addr]:[TCP::local_port]: found [STREAM::match], replaced with: [string map {http:// HTTPS://} [STREAM::match]]"
STREAM::replace "[string map {http:// https://} [STREAM::match]]"
}
}
This rule does not works and show this error: " Rule /Common/iRule_Scielo_EXCEPTIONS : 192.168.210.36:19119: found http://, but did not modify it"
So where is my problem, I only want excluding some urls from stream conversion. Thank
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