Fix asset cache-busting — include base.css and base.js in ASSET_VERSION
Previously only dashboard/ticket assets were tracked, so changes to base.css and base.js were never reflected in the cache-busting version string. Browsers served stale cached copies, meaning the header padding-top fix never reached users. Touch base files to bump mtime and force a cache miss immediately. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+3
-1
@@ -25,13 +25,15 @@ $GLOBALS['config'] = [
|
||||
'APP_SUBTITLE' => $envVars['APP_SUBTITLE'] ?? 'LotusGuild Infrastructure',
|
||||
'APP_VERSION' => $envVars['APP_VERSION'] ?? '1.2',
|
||||
|
||||
// Asset cache-busting version — auto-computed from dashboard.js/css mtime so
|
||||
// Asset cache-busting version — auto-computed from key asset mtimes so
|
||||
// browsers always pick up changes on deploy. Override via ASSET_VERSION in .env.
|
||||
'ASSET_VERSION' => (function() use ($envVars) {
|
||||
if (!empty($envVars['ASSET_VERSION'])) return $envVars['ASSET_VERSION'];
|
||||
$files = [
|
||||
__DIR__ . '/../assets/css/base.css',
|
||||
__DIR__ . '/../assets/css/dashboard.css',
|
||||
__DIR__ . '/../assets/css/ticket.css',
|
||||
__DIR__ . '/../assets/js/base.js',
|
||||
__DIR__ . '/../assets/js/dashboard.js',
|
||||
__DIR__ . '/../assets/js/ticket.js',
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user