Don't group js files with images in cache contral
That's because we want the bundle to be super-cached and immutable.
This commit is contained in:
parent
5d8314d13b
commit
228f4a6db9
1 changed files with 1 additions and 1 deletions
|
|
@ -93,7 +93,7 @@ func fileServer(r chi.Router, path string, root http.FileSystem, embeddedFS embe
|
|||
if config.IsProductionEnvironment() {
|
||||
ext := filepath.Ext(requestedPath)
|
||||
switch ext {
|
||||
case ".css", ".js", ".jpg", ".jpeg", ".png", ".gif", ".svg", ".woff", ".woff2", ".ttf":
|
||||
case ".css", ".jpg", ".jpeg", ".png", ".gif", ".svg", ".woff", ".woff2", ".ttf":
|
||||
// Cache for 1 week (604800 seconds)
|
||||
crw.Header().Set("Cache-Control", "public, max-age=604800, stale-while-revalidate=86400")
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue