I configured fiddler to redirect all https traffic destined to oldURL.com to newURL.com, using the below fiddlerscript sample from the Telerik Fiddler documentation.
This has been working fine for several months. Today I attempted to execute the same monthly process, but this time it failed.
After some investigation I noticed that fiddler is returning a certificate with the wrong CN
A quick test in Chrome shows that when browsing to https://oldURL.com, fiddler returns a certificate with a subject of CN=newURL.com
This causes the handshake to fail with my application, and the montly process to abort.
I can only assume that this issue crept in when I updated Fiddler last month to: v5.0.20181.14850 for .NET 4.6.1
I have now worked around this by also adding oSession["X-OverrideCertCN"] = "oldURL.com";
What is the correct way to redirect HTTPS request & Tunnel, whilst still providing a correctly named certificate to the client application?
https://docs.telerik.com/fiddler/KnowledgeBase/FiddlerScript/ModifyRequestOrResponse
<p>
//Point all requests for one server to a different server, including HTTPS tunnels<br>
// Redirect traffic, including HTTPS tunnels
</p>
<p>
if (oSession.HTTPMethodIs("CONNECT") && (oSession.PathAndQuery == "www.example.com:443"))<br>
{ <br>
oSession.PathAndQuery = "beta.example.com:443";<br>
}<br>
<br>
if (oSession.HostnameIs("www.example.com")) oSession.hostname = "beta.example.com";
</p>