Add cache-busting query strings and no-cache for HTML files
Build and Push Docker Image / build-and-push (push) Successful in 39s

Proxy was caching old admin.js; ?v=3 query string forces a fresh fetch.
Also extend no-cache header to .html files so future deploys propagate immediately.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
nmemmertandClaude Sonnet 4.6 committed 2026-10-19 15:39:40 -04:00
1 parent 3eb6322427
commit 3d1e887c19
3 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -793,6 +793,6 @@
</div> </div>
</div> </div>
<script src="admin.js"></script> <script src="admin.js?v=3"></script>
</body> </body>
</html> </html>
+2 -2
View File
@@ -4,7 +4,7 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Homeschool</title> <title>Homeschool</title>
<link rel="stylesheet" href="styles.css"> <link rel="stylesheet" href="styles.css?v=3">
</head> </head>
<body> <body>
@@ -366,6 +366,6 @@
</div> </div>
</section> </section>
<script src="app.js"></script> <script src="app.js?v=3"></script>
</body> </body>
</html> </html>
+1 -1
View File
@@ -36,7 +36,7 @@ const app = express();
app.use(express.json({ limit: '15mb' })); // photos for page-scanning are base64 in the JSON body app.use(express.json({ limit: '15mb' })); // photos for page-scanning are base64 in the JSON body
app.use(express.static(join(ROOT, 'public'), { app.use(express.static(join(ROOT, 'public'), {
setHeaders(res, filePath) { setHeaders(res, filePath) {
if (filePath.endsWith('.css') || filePath.endsWith('.js')) { if (filePath.endsWith('.css') || filePath.endsWith('.js') || filePath.endsWith('.html')) {
res.setHeader('Cache-Control', 'no-cache'); res.setHeader('Cache-Control', 'no-cache');
} }
}, },