Skip to content

Commit

Permalink
Set cache control for our JS/CSS assets to be kept for 28 days (#17636)
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesMGreene authored Feb 2, 2021
1 parent ba539cc commit e53d1b7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion middleware/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,13 @@ module.exports = function (app) {
// *** Rendering, 2xx responses ***
// I largely ordered these by use frequency
app.use(instrument('./archived-enterprise-versions-assets')) // Must come before static/assets
app.use('/dist', express.static('dist'))
app.use('/dist', express.static('dist', {
index: false,
etag: false,
immutable: true,
lastModified: false,
maxAge: '28 days'
}))
app.use('/assets', express.static('assets'))
app.use('/public', express.static('data/graphql'))
app.use('/events', instrument('./events'))
Expand Down

0 comments on commit e53d1b7

Please sign in to comment.