fix: correct path prefix check for static assets caching (#2433)

This commit is contained in:
Lucas Smith
2026-01-29 16:05:08 +11:00
committed by GitHub
parent 25e148d459
commit 0f8b7670f4
+1 -1
View File
@@ -17,7 +17,7 @@ server.use(
serveStatic({
root: 'build/client',
onFound: (path, c) => {
if (path.startsWith('./build/client/assets')) {
if (path.startsWith('build/client/assets')) {
// Hard cache assets with hashed file names.
c.header('Cache-Control', 'public, immutable, max-age=31536000');
} else {