Forum Discussion
Redirecting http request to external url via proxy
Hi We are trying something similar. We want to publish a web page with a blog on that page pulled from a third party. I can capture the content by looking for a uri starting with /news-and-blog/ I send this to a proxy and rewrite the host header. This sends the blog content to a virtual server (with the proxy server as a pool member). This works OK for HTTP traffic but if we try to use HTTPS it fails. The proxy always sees HTTP for some reason. I have also tried substituting the pool for the VIP in this iRule without success.
when HTTP_REQUEST {
if {[HTTP::uri] starts_with "/news-and-blog/" } {
HTTP::header replace Host "myblog-uat.third_party.com"
virtual /S1SIL/VS_S2S_PROXYHTTP_INTERNAL_LIVE
log local0. "Sending Blog content slblog-uat.third_party.com[HTTP::uri]to 3rd pary"
} else {
pool pool_iab3
}
}
The site at the Third party can only listen on HTTP or HTTPS, not both so we have to get them to switch when we are testing.
Any help appreciated.
Cheers
Drew
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