Forum Discussion
James_Dyson_470
Nimbostratus
May 12, 2006multiple rules / header info removing
Hi Guys,
I've got a build running production traffic that has just been pen tested and one of the complaints was the BigIP returning OS information in the header. (ver9.x)
I know (or think I know) that this can be stopeed using an iRule such as;
rule when HTTP_RESPONSE {
Remove all but the given headers.
HTTP::header sanitize “ETag” “Header01” “Header02”
but the problem is we are already using the following rules.
}
rule prod-https-redirect {
when HTTP_REQUEST {
HTTP::redirect "https://www.site.com/prod/"
}
}
rule prod-https-addition {
when HTTP_REQUEST {
if { [HTTP::uri] eq "/" } {
HTTP::redirect https://www.site.com/prod/
}
}
}
rule redirect-prod-addition {
when HTTP_REQUEST {
if { [HTTP::uri] eq "/" or [HTTP::uri] eq "" } {
HTTP::redirect https://www.site.com/prod/
}
}
SO basically we are running ssl on the f5, and redirects for the http and https, is there going to be an issue applying the header change rule, or is there a neater way of doing it?
Thanks for any advice in advance.
J
- Deb_Allen_18Historic F5 AccountYou'll need to build your own HTTP redirect using TCP::respond rather than HTTP::respond.
when HTTP_REQUEST { set location "http://www.domain.com/uri" TCP::respond "HTTP/1.1 302 Found\r\nLocation: $location\r\nConnection: close\r\nContent-Length: 0\r\n\r\n" TCP::close }
- Deb_Allen_18Historic F5 Account???
0x0000 4500 0085 d468 4000 ff06 484f ac19 c32d E....h@...HO...- 0x0010 c0a8 2ecb 1f90 074f a4f5 1b61 eea3 9967 .......O...a...g 0x0020 5018 111c 4aa1 0000 4854 5450 2f31 2e31 P...J...HTTP/1.1 0x0030 2033 3032 2046 6f75 6e64 0d0a 4c6f 6361 .302.Found..Loca 0x0040 7469 6f6e 3a20 6874 7470 3a2f 2f77 7777 tion:.http://www 0x0050 2e67 6f6f 676c 652e 636f 6d0d 0a43 6f6e .google.com..Con 0x0060 6e65 6374 696f 6e3a 2063 6c6f 7365 0d0a nection:.close.. 0x0070 436f 6e74 656e 742d 4c65 6e67 7468 3a20 Content-Length:. 0x0080 300d 0a0d 0a 0....
- James_Dyson_470
Nimbostratus
ok, so now I'm really confused. - Deb_Allen_18Historic F5 AccountYou're not slow. There are couple of things here that are not quite intuitive:
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