Forum Discussion
Sep 19, 2014
BIG-IP add custom header
F5 BIG-IP LTM VE v11.4.0 on ESXi
I want to add a custom header to my request before rewriting to a backend server :
when HTTP_REQUEST {
HTTP::header insert uri-original [HTTP::uri]
...
...
nitass_89166
Noctilucent
could you please elaborate ?
e.g.
configuration
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) 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 {
rule1
rule2
}
source 0.0.0.0/0
source-address-translation {
type automap
}
vs-index 3
}
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm rule rule1
ltm rule rule1 {
when HTTP_REQUEST priority 1 {
HTTP::redirect "http://www.google.com"
}
}
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm rule rule2
ltm rule rule2 {
when HTTP_REQUEST priority 2 {
HTTP::header insert test 1234
}
}
/var/log/ltm
[root@ve11a:Active:In Sync] config tail -f /var/log/ltm
Nov 23 22:21:35 ve11a err tmm1[14890]: 01220001:3: TCL error: /Common/rule2 - Operation not supported (line 1) invoked from within "HTTP::header insert test 1234"
nitass_89166
Nov 23, 2014Noctilucent
what i want to show is the error is caused by conflicting in action (not the command itself). it is just an example because i do not know what you are doing in your another irule.
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