Forum Discussion
Bill_8097
Nimbostratus
Mar 07, 2013IRule to remove all headers with the same base name
Due to header length limitations of my backend application I need to remove un-used headers that are being sent from my WebSeal to the backend.
I have the following IRule in place now:
when...
nitass
Employee
Mar 07, 2013may we loop HTTP::header names?
e.g.
[root@ve10:Active] config b virtual bar list
virtual bar {
snat automap
pool foo
destination 172.28.19.252:80
ip protocol 6
rules myrule
profiles {
http {}
tcp {}
}
}
[root@ve10:Active] config b pool foo list
pool foo {
members 200.200.200.101:80 {}
}
[root@ve10:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
foreach aheader [HTTP::header names] {
if { $aheader starts_with "iv-creds" } {
HTTP::header remove $aheader
}
}
}
}
[root@ve10:Active] config ssldump -Aed -nni 0.0 port 80
New TCP connection 1: 172.28.19.251(42603) <-> 172.28.19.252(80)
1362699807.7819 (0.0007) C>S
---------------------------------------------------------------
HEAD / HTTP/1.1
User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
Host: 172.28.19.252
Accept: */*
something: aaa
iv-creds: 111
iv-creds-1: 222
somethingelse: 333
---------------------------------------------------------------
New TCP connection 2: 200.200.200.10(42603) <-> 200.200.200.101(80)
1362699807.7829 (0.0006) C>S
---------------------------------------------------------------
HEAD / HTTP/1.1
User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
Host: 172.28.19.252
Accept: */*
something: aaa
somethingelse: 333
---------------------------------------------------------------
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