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:
2026-04-01 17:43:18 -04:00
parent 6102985f92
commit e71f35c041
+3 -1
View File
@@ -25,13 +25,15 @@ $GLOBALS['config'] = [
'APP_SUBTITLE' => $envVars['APP_SUBTITLE'] ?? 'LotusGuild Infrastructure', 'APP_SUBTITLE' => $envVars['APP_SUBTITLE'] ?? 'LotusGuild Infrastructure',
'APP_VERSION' => $envVars['APP_VERSION'] ?? '1.2', '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. // browsers always pick up changes on deploy. Override via ASSET_VERSION in .env.
'ASSET_VERSION' => (function() use ($envVars) { 'ASSET_VERSION' => (function() use ($envVars) {
if (!empty($envVars['ASSET_VERSION'])) return $envVars['ASSET_VERSION']; if (!empty($envVars['ASSET_VERSION'])) return $envVars['ASSET_VERSION'];
$files = [ $files = [
__DIR__ . '/../assets/css/base.css',
__DIR__ . '/../assets/css/dashboard.css', __DIR__ . '/../assets/css/dashboard.css',
__DIR__ . '/../assets/css/ticket.css', __DIR__ . '/../assets/css/ticket.css',
__DIR__ . '/../assets/js/base.js',
__DIR__ . '/../assets/js/dashboard.js', __DIR__ . '/../assets/js/dashboard.js',
__DIR__ . '/../assets/js/ticket.js', __DIR__ . '/../assets/js/ticket.js',
]; ];