Hi,
I have two websites, 1.com and 2.com, running as virtual hosts on the same IP address. Both sites are SSL, so the SSL extension Server Name Indication (SNI) is used to indicate which host a connection is requesting. The test instances for these sites are set up with the same names as production but on a different IP address. To access the test sites without hacking my hosts file I use fiddler with a customized CustomRules.js to override the host the requests are sent to.
static function OnBeforeRequest(oSession: Session)
{
if (oSession.HostnameIs("1.com") ) {
oSession.bypassGateway = true;
oSession["x-overrideHost"] = "10.0.0.1:" + oSession.port;
}
if (oSession.HostnameIs("2.com") && oSession.uriContains("/blah/")) {
oSession.bypassGateway = true;
oSession["x-overrideHost"] = "10.0.0.1:" + oSession.port;
}
This works perfectly when I enable one or the other redirection at a time. However, there is a page on 1.com which contains iframes which loads content from both sites and when I enable both redirects I get continuous "400 Bad Response" errors in the iframes for content from 2.com and the web server logs the error "Hostname 1.com provided via SNI and hostname 2.com provided via HTTP are different"
If I remove the test << && oSession.uriContains("/blah/" >> from the fiddler script, content loads most of the time from 2.com, but there are still sporadic 400 bad response errors.
Can anybody help please?
thanx
Simon