5

I have noticed that glimpse checks whether there are any update on clientside via https://getglimpse.com/Api/Version/Check?Glimpse.Ado=1.7.3&Glimpse.AspNet=1.9.2&Glimpse=1.8.6&Glimpse.EF6=1.6.5&Glimpse.Mvc5=1.5.3&stamp=1450129430335&callback=glimpse.versionCheck.result .

http://prntscr.com/9edgdy

Also request couldnt be completed since link's certificate is not valid,

How can I disable it?

Oğuzhan Topçu
  • 571
  • 2
  • 8
  • 17
  • 1
    Same problem here. Not only is the cert invalid, but many organizations do not like leaving any kind of "phone home" feature enabled. – CrazyPyro Feb 17 '16 at 23:56

2 Answers2

2

Set <add key="GlimpseVersionCheckAPIDomain" value="240.0.0.1" /> in <appSettings> of your Web.config.

This reconfigures any call that would have otherwise gone to getglimpse.com into a black hole instead. I tested this and confirmed zero phone-home attempts, and much quicker page loads now.

Relevant code is in: Glimpse.Core/Resource/VersionCheckResource.cs

var domain = ConfigurationManager.AppSettings["GlimpseVersionCheckAPIDomain"];

        if (string.IsNullOrEmpty(domain))
        {
            domain = "getGlimpse.com";
        }

        return new CacheControlDecorator(OneDay, CacheSetting.Public, new RedirectResourceResult(@"//" + domain + "/Api/Version/Check{?packages*}{&stamp}{&callback}", data));
Community
  • 1
  • 1
CrazyPyro
  • 3,257
  • 3
  • 30
  • 39
1

Changing config with different or loopback address for Url won't stop the Glimpse to make request version check request. I found that the version check is triggered from client side function versionCheck.

Here's a hot-fix I figured out how to disable the function versionCheck on glimpse object:

document.addEventListener("DOMContentLoaded", function () {
    // A wierd fix to wait until glimpse is initialized.
    setTimeout(turnoffGlimpseVersionCheck, 100);
});

function turnoffGlimpseVersionCheck() {

    if (typeof glimpse == 'undefined') {
        console.log("glimpse not found!")
    }
    else {
        console.log(glimpse.settings);
        glimpse.versionCheck = function () { };
        console.log("glimpse updates turned off!!")
    }
}

It might not look good but it will just do the trick.

Update

Here's a updated and better version:

<script>

    document.addEventListener("DOMContentLoaded", function () {
        var scripts = document.getElementsByTagName("script");
        var isGlimpseLoaded = false;
        for (var i = 0; i < scripts.length; ++i) {
            var src = scripts[i].getAttribute('src');
            if (src == null) continue;
            if (src.indexOf('Glimpse.axd') > -1) {
                turnoffGlimpseVersionCheck();
                break;
            }
        }

    });

    function turnoffGlimpseVersionCheck() {
        glimpse.versionCheck = function () { };
        console.log('glimpse version check disabled!!')
    }

</script>
vendettamit
  • 14,315
  • 2
  • 32
  • 54