From 15ed2eb245d880a292375a18c61444eff7da66f0 Mon Sep 17 00:00:00 2001 From: Michael Barrett Date: Mon, 18 Mar 2024 09:29:00 +0000 Subject: [PATCH] Added date based cache buster to client script (#19873) refs https://app.incident.io/ghost/incidents/39 --- ghost/admin/app/controllers/application.js | 4 ++++ ghost/admin/app/templates/application.hbs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ghost/admin/app/controllers/application.js b/ghost/admin/app/controllers/application.js index c014d571aa..6c15e2840d 100644 --- a/ghost/admin/app/controllers/application.js +++ b/ghost/admin/app/controllers/application.js @@ -27,6 +27,10 @@ export default class ApplicationController extends Controller { return this.config.clientExtensions?.script; } + get cacheBuster() { + return Date.now(); + } + get showNavMenu() { let {router, session, ui} = this; diff --git a/ghost/admin/app/templates/application.hbs b/ghost/admin/app/templates/application.hbs index fe955babf1..dbc514172e 100644 --- a/ghost/admin/app/templates/application.hbs +++ b/ghost/admin/app/templates/application.hbs @@ -40,7 +40,7 @@ {{#if this.showScriptExtension}} {{{this.showScriptExtension.container}}} {{!-- template-lint-disable no-forbidden-elements --}} - + {{/if}} {{#if this.settings.accentColor}}