Forum Discussion
tim_pearson_938
Nimbostratus
Oct 10, 2008fooling a client and the server
I am trying to get an iPhone to connect to our iNotes server and neither are playing nice. I think I can fool it by using the F5. My issue is that the iNotes server will not accept an IP address as ...
hoolio
Cirrostratus
Oct 10, 2008Something like this maybe?
when HTTP_REQUEST {
Set a flag to rewrite host in redirect responses
set check_response 0
Check if host is an IP address
if {[HTTP::host] eq "10.198.239.248"}{
Replace host header
HTTP::header replace Host "newhost.example.com"
Set a flag to rewrite host in redirect responses
set check_response 1
}
}
when HTTP_RESPONSE {
if {$check_response and [HTTP::is_redirect]}{
Rewrite the Location header to an IP
HTTP::header replace Location [string map {newhost.example.com 10.198.239.248} [HTTP::header value Location]]
}
}
If you have multiple IP addresses you'd potentially want to check for let me know. This option should work for a single IP.
Aaron
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