0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Added date based cache buster to client script (#19873)

refs https://app.incident.io/ghost/incidents/39
This commit is contained in:
Michael Barrett 2024-03-18 09:29:00 +00:00 committed by GitHub
parent 6849aa9891
commit 15ed2eb245
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View file

@ -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;

View file

@ -40,7 +40,7 @@
{{#if this.showScriptExtension}}
{{{this.showScriptExtension.container}}}
{{!-- template-lint-disable no-forbidden-elements --}}
<script src="{{this.showScriptExtension.src}}"></script>
<script src="{{this.showScriptExtension.src}}?v={{this.cacheBuster}}"></script>
{{/if}}
{{#if this.settings.accentColor}}