【问题标题】:fiddler redirect https to localhost提琴手将 https 重定向到本地主机
【发布时间】:2015-04-17 08:19:55
【问题描述】:

我有一个 iPhone 应用程序连接到 Azure 中的 HTTPS 服务。我想通过 Fiddler 将 iPhone 调用重定向到 http://localhost:19703,我在本地机器上运行相同的服务以进行调试。我可以使用以下 Fiddler 脚本将 HTTPS 服务重定向到另一个 HTTPS 服务。但是,如果我使用相同的脚本重定向到 localhost:19703,它就不起作用。有什么想法吗?

   if (oSession.HTTPMethodIs("CONNECT") && (oSession.PathAndQuery ==  "XXXX.azurewebsites.net:443")) 
    {  
        oSession["OriginalHostname"] = oSession.hostname;
        oSession.PathAndQuery =  "YYYY.azurewebsites.net:443";  
    }

    // If it's an HTTPS tunnel, override the certificate

    if (oSession.HTTPMethodIs("CONNECT") && (null != oSession["OriginalHostname"]))
    {
        oSession["x-overrideCertCN"] = oSession["OriginalHostname"];
        oSession["X-IgnoreCertCNMismatch"] = "Server's hostname may not match what we're expecting...";
    }
    oSession.bypassGateway = true;

【问题讨论】:

    标签: redirect https localhost fiddler


    【解决方案1】:

    尝试使用这种方法:

    static function OnBeforeRequest(oSession:Fiddler.Session) {
        ...
        if (oSession.HostnameIs("YYYY.azurewebsites.net")) {
            oSession.host = "127.0.0.1:19703";
        }
        ...
    }
    

    问题的完整描述是here

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-05-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-03-29
      • 2011-01-06
      • 2018-10-12
      • 2017-10-04
      相关资源
      最近更新 更多