add cache header to static assets
This commit is contained in:
@@ -63,6 +63,7 @@ export class AssetBuilder {
|
|||||||
res
|
res
|
||||||
.status(200)
|
.status(200)
|
||||||
.type(extension.endsWith("tsx") ? "text/javascript" : extension)
|
.type(extension.endsWith("tsx") ? "text/javascript" : extension)
|
||||||
|
.header("Cache-Control", "public, max-age=604800, immutable")
|
||||||
.sendFile(file)
|
.sendFile(file)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user