Forum Discussion
martin_58353
Sep 09, 2017Cirrus
iRule STREAM::expression is not working
Hello,
I have an issue with some html code injection. Below is LTM config and iRule.
LTM config:
ltm virtual /IB/vs_george-uat2_8090 {
description "george-uat2"
destination /...
- Sep 11, 2017
I have solution!
REQUEST event has no Content-Type in HTTP header, therefore is condition always false. Here is a correct code:
when HTTP_REQUEST { set path [HTTP::path] switch $path { "/" { removed if { [HTTP::header value Content-Type] contains "text/html" } { HTTP::header remove "Accept-Encoding" removed } } } }
martin_58353
Sep 11, 2017Cirrus
I have solution!
REQUEST event has no Content-Type in HTTP header, therefore is condition always false. Here is a correct code:
when HTTP_REQUEST {
set path [HTTP::path]
switch $path {
"/" {
removed if { [HTTP::header value Content-Type] contains "text/html" } {
HTTP::header remove "Accept-Encoding"
removed }
}
}
}
- Stanislas_Piro2Sep 13, 2017Cumulonimbus
I'm glad I provided the solution but I'm surprised you accept your own answer as solution.
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