mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-06 15:49:01 +02:00
Merge pull request #5685 from overleaf/jpa-web-no-cdn
[web] add support for nocdn fallback on marketing pages GitOrigin-RevId: c125c44f9187de7e1127c77311c54bef7c4b86c9
This commit is contained in:
@@ -136,3 +136,12 @@ html(
|
||||
block foot-scripts
|
||||
each file in entrypointScripts(entrypoint)
|
||||
script(type="text/javascript", nonce=scriptNonce, src=file)
|
||||
script(type="text/javascript", nonce=scriptNonce).
|
||||
//- Look for bundle
|
||||
var cdnBlocked = typeof Frontend === 'undefined'
|
||||
//- Prevent loops
|
||||
var noCdnAlreadyInUrl = window.location.href.indexOf("nocdn=true") != -1
|
||||
if (cdnBlocked && !noCdnAlreadyInUrl && navigator.userAgent.indexOf("Googlebot") == -1) {
|
||||
//- Set query param, server will not set CDN url
|
||||
window.location.search += "&nocdn=true";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user