From 564f40978fb863e7824dac715b87107c46d037e6 Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Thu, 21 Oct 2021 13:44:22 +0200 Subject: [PATCH] Merge pull request #5504 from overleaf/jpa-old-cdn-probe [web] add a probe for the old/current CDN GitOrigin-RevId: 59e34e793edceebb49a8d6fa4e3e6716b921d09d --- services/web/frontend/js/cdn-load-test.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/services/web/frontend/js/cdn-load-test.js b/services/web/frontend/js/cdn-load-test.js index a89a4e2bb3..7a281c78bc 100644 --- a/services/web/frontend/js/cdn-load-test.js +++ b/services/web/frontend/js/cdn-load-test.js @@ -6,4 +6,10 @@ if (window.ExposedSettings.isOverleaf) { captureMessage('CDN test image load error (cdn.overleaf.net)') }) cdnLoadTest.src = 'https://cdn.overleaf.net/img/1p.gif' + + const cdnLoadTestOld = document.createElement('img') + cdnLoadTestOld.addEventListener('error', function () { + captureMessage('CDN test image load error (cdn.overleaf.com)') + }) + cdnLoadTestOld.src = 'https://cdn.overleaf.com/img/1p.gif' }