feat(chatwoot): Met à jour l'URL et le token Chatwoot pour l'environnement de production.

🔒️ fix(caddy): Met à jour la CSP pour autoriser le nouveau domaine Chatwoot.
This commit is contained in:
Serreau Jovann
2025-12-25 00:26:43 +01:00
parent 1599450f3a
commit 0b595b7191
2 changed files with 5 additions and 6 deletions

View File

@@ -457,27 +457,26 @@ document.addEventListener('DOMContentLoaded', ()=>{
// Gère le bandeau de cookies (bottom-right)
handleCookieBanner()
}
/*if (!isPerformanceTestAgent()) {
var BASE_URL_WOOT = "https://app.chatwoot.com";
if (!isPerformanceTestAgent()) {
var BASE_URL_WOOT = "https://chat.esy-web.dev/";
let script = document.createElement('script');
script.setAttribute('src', BASE_URL_WOOT + "/packs/js/sdk.js")
script.setAttribute('sync', true)
document.head.append(script)
script.onload = function () {
window.chatwootSDK.run({
websiteToken: '8SXvcdoWJVA77hug4mT5JhAP',
websiteToken: '6uFX3g3qybyvSt3PAQUMgkm4',
baseUrl: BASE_URL_WOOT
})
}
}
const env = document.querySelector('meta[name="env"]')
if(env.getAttribute('content') == "prod") {
if (typeof navigator.serviceWorker !== 'undefined') {
// Assurez-vous que le Service Worker est bien enregistré en mode prod
navigator.serviceWorker.register('sw.js')
}
}*/
}
});
document.addEventListener('turbo:load', () => {
initializeUI();