forked from ORGANISATION-KA-INTERNATIONALE/FEDIVERSE-OKI
fix: prevent stale mastodon instance config from cache
This commit is contained in:
@@ -676,7 +676,7 @@ setSecurityHeaders();
|
||||
<script src="js/main.js"></script>
|
||||
<script src="js/pleroma-adapter.js"></script>
|
||||
<script src="js/mastodon-timeline.umd.js"></script>
|
||||
<script src="js/mastodon-config.php"></script>
|
||||
<script src="js/mastodon-config.php?v=<?php echo md5(MASTODON_INSTANCE_URL . MASTODON_DATE_FORMAT . MASTODON_BTN_SEE_MORE . MASTODON_BTN_RELOAD . MASTODON_MAX_POST_FETCH . MASTODON_MAX_POST_SHOW); ?>"></script>
|
||||
|
||||
<!-- PWA Service Worker -->
|
||||
<script>
|
||||
|
||||
@@ -4,6 +4,10 @@ require_once '../includes/config.php';
|
||||
|
||||
// Définir le type de contenu en JavaScript
|
||||
header('Content-Type: application/javascript');
|
||||
// Empêcher la mise en cache navigateur de la configuration dynamique
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0');
|
||||
header('Pragma: no-cache');
|
||||
header('Expires: 0');
|
||||
?>
|
||||
window.addEventListener("load", () => {
|
||||
const mastodonTimeline = new MastodonTimeline.Init({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
const CACHE_NAME = 'fediverse-oki-16102025-1128';
|
||||
const STATIC_CACHE_NAME = 'fediverse-oki-static-16102025-1128';
|
||||
const DYNAMIC_CACHE_NAME = 'fediverse-oki-dynamic-16102025-1128';
|
||||
const CACHE_NAME = 'fediverse-oki-08072026-0720';
|
||||
const STATIC_CACHE_NAME = 'fediverse-oki-static-08072026-0720';
|
||||
const DYNAMIC_CACHE_NAME = 'fediverse-oki-dynamic-08072026-0720';
|
||||
|
||||
// Ressources à mettre en cache immédiatement
|
||||
const STATIC_ASSETS = [
|
||||
|
||||
Reference in New Issue
Block a user