Forum Discussion
Sinistrad_29710
Nimbostratus
Feb 23, 2017iRule STREAM
Hi all,
I'm testing the iRule below but it seems to be false, because i get an Error 411 :
when HTTP_REQUEST {
if { [HTTP::host] eq "alfons-pp.domain.com" } {
STREAM::disable
HTTP::header ...
Ajit
Altostratus
Mar 24, 2017Hello Sinistrad,
Try the following iRule and let me know how it goes :
when HTTP_REQUEST {
HTTP::header remove "Accept-Encoding"
STREAM::disable
set host [HTTP::host]
}
when HTTP_RESPONSE {
STREAM::disable
if { [HTTP::header exists Location] } {
HTTP::header replace Location [string map {"http://" "https://"} [HTTP::header Location]]
}
if { [HTTP::header Content-Type] contains "text" } {
set before "http://${host}:80/"
set after "https://${host}/"
STREAM::expression "@${before}@${after}@"
STREAM::enable
}
}
Regards,
AS
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