✨ 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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user