Forum Discussion
skarpovi_111573
Nimbostratus
Apr 09, 2008HTTP::header insert
tried to use simple rule with HTTP::header insert, but don't see anything in TCP dump. it does redirect to https, however - no string in the header
when HTTP_REQUEST {
if {[TCP::local_port] eq "80...
Apr 10, 2008
Based on your request
1. For HTTP requests, issue a HTTPS redirect to the client browser.
2. For Non-HTTP requests, insert the "STRING=MLint" header for IIS.
This should work.
when HTTP_REQUEST {
if { [TCP::local_port] eq 80 } {
Send HTTP redirect to browser
HTTP::redirect "https://[HTTP::host][HTTP::uri]test"
} else {
Add header with name "STRING" and value "MLint"
to be sent to backend webserver
HTTP::header insert STRING "MLint"
}
}Now, this didn't include a filter for source IP but that could easily be done with an elseif instead of the else testing for the IP::client_addr against either an address (10.10.10.10), a masked address (ie. 10.10.10.0/24), or an address class using the matchclass command.
Hope this helps...
-Joe
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
