mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-19 18:04:07 +00:00
Merge pull request #4311 from overleaf/tm-cdn-load-errors
Add 1px image from overleaf CDN to layout and report if load fails GitOrigin-RevId: e1da60d338596db48c0ebb4446bd27e8e1f704ce
This commit is contained in:
parent
41471ec60f
commit
11af938486
1 changed files with 8 additions and 0 deletions
|
@ -130,3 +130,11 @@ html(
|
|||
//- Set query param, server will not set CDN url
|
||||
window.location.search += "&nocdn=true";
|
||||
}
|
||||
if hasFeature('saas')
|
||||
script(type="text/javascript", nonce=scriptNonce).
|
||||
//- Test for CDN availability and report to sentry if loading failed
|
||||
var cdnLoadTest = document.createElement('img')
|
||||
cdnLoadTest.addEventListener('error', function () {
|
||||
throw new Error('CDN test image load error (cdn.overleaf.net)')
|
||||
})
|
||||
cdnLoadTest.src = 'https://cdn.overleaf.net/img/1p.gif'
|
||||
|
|
Loading…
Reference in a new issue