Forum Discussion
F5 load balancer issues with TFS 2018. Adding port 8080 when coming from load balancer
If I correctly gather what you're describing, clients communicate with the F5 VIP on port 80, so the URL is simply http://www.site.com/tfs. But in some scenarios, the backend web server responds with URLs to itself, in document objects references in the HTML response, or as HTTP redirects, that include a port number (ex. ), which the browser tries and fails to access.
If that's correct, the simplest option would be to strip the port number from responses using a STREAM expression. Add an empty STREAM profile to the VIP and an iRule that looks something like this:
when HTTP_REQUEST {
STREAM::disable
HTTP::header remove "Accept-Encoding"
}
when HTTP_RESPONSE {
if { ( [HTTP::header exists Location] ) and ( [HTTP::header Location] contains ":8080" ) } {
HTTP::header replace Location [string map {":8080" ""} [HTTP::header Location]]
} elseif { [HTTP::header value Content-Type] starts_with "text" } {
STREAM::expression (@:8080@@}
STREAM::enable
}
}
The above will strip the :8080 value from the Location header if a redirect, or anywhere in the HTML response otherwise.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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