Restore both Umami and Cloudflare Web Analytics with adblock bypass tunnels
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -16,6 +16,13 @@ ticket.e-cosplay.fr {
|
||||
}
|
||||
}
|
||||
|
||||
handle_path /cdn-cgi/* {
|
||||
rewrite * {uri}
|
||||
reverse_proxy https://static.cloudflareinsights.com {
|
||||
header_up Host static.cloudflareinsights.com
|
||||
}
|
||||
}
|
||||
|
||||
@maintenance file /var/www/e-ticket/public/.update
|
||||
handle @maintenance {
|
||||
root * /var/www/e-ticket/public
|
||||
|
||||
@@ -25,6 +25,20 @@ function loadAnalytics() {
|
||||
script.dataset.hostUrl = '/stats'
|
||||
script.dataset.analytics = '1'
|
||||
document.head.appendChild(script)
|
||||
|
||||
loadCloudflareTunnel()
|
||||
}
|
||||
|
||||
function loadCloudflareTunnel() {
|
||||
if (document.querySelector('script[data-cf-beacon]')) {
|
||||
return
|
||||
}
|
||||
|
||||
const script = document.createElement('script')
|
||||
script.defer = true
|
||||
script.src = '/cdn-cgi/beacon.min.js'
|
||||
script.dataset.cfBeacon = '{"token":"5f2f3b8e1f824be6984a348fe31d2f04","spa":true}'
|
||||
document.head.appendChild(script)
|
||||
}
|
||||
|
||||
export function initCookieConsent() {
|
||||
|
||||
Reference in New Issue
Block a user