Forum Discussion
Merlin_kv_17750
Jun 11, 2015Nimbostratus
insert X-Forwarded-Proto log TCL error
Hello,
We have iRule applied to tcp/80 VS. In it under HTTP_REQUEST there are two switch commands and the second has default statement: default { HTTP::header insert X-Forwarded-Proto http }. Lo...
nitass_89166
Jun 11, 2015Noctilucent
i think request matches both HTTP::respond and HTTP::header insert commands.
configuration
[root@ve11c:Active:In Sync] config tmsh list ltm virtual bar
ltm virtual bar {
destination 172.28.24.10:80
ip-protocol tcp
mask 255.255.255.255
pool foo
profiles {
http { }
tcp { }
}
rules {
qux
}
source 0.0.0.0/0
source-address-translation {
type automap
}
vs-index 8
}
[root@ve11c:Active:In Sync] config tmsh list ltm rule qux
ltm rule qux {
when HTTP_REQUEST {
HTTP::respond 301
HTTP::header insert x http_cookie
}
}
test
[root@ve11c:Active:In Sync] config curl -I http://172.28.24.10
HTTP/1.0 301 Moved Permanently
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
/var/log/ltm
[root@ve11c:Active:In Sync] config cat /var/log/ltm
Jun 11 16:59:35 ve11c err tmm[10748]: 01220001:3: TCL error: /Common/qux - Operation not supported (line 1) invoked from within "HTTP::header insert x http_cookie"
- Merlin_kv_17750Jun 11, 2015Nimbostratusis it possible to rewrite irule with if { both switches} and else { default action }? and to left possibility for execution both conditions simultaneously?
- nitass_89166Jun 11, 2015Noctilucentcan we just put return command after condition matches? return https://clouddocs.f5.com/api/irules/return.html
- Merlin_kv_17750Jun 11, 2015Nimbostratusdo you mean return after first redirect?
- nitass_89166Jun 11, 2015Noctilucentyes
- Merlin_kv_17750Jun 11, 2015Nimbostratusit works! thank you!
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