mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-05 19:03:30 -05:00
Tell browsers not to re-fetch static assets
Since we version our asset filenames there’s no need for a browser to ever fetch the same file twice. It should always cache fetch from its own cache. The accepted way to effect this behaviour is using the expires header, which is what this argument to `WhiteNoise` does.
This commit is contained in:
@@ -12,4 +12,4 @@ STATIC_URL = 'static/'
|
||||
app = Flask('app')
|
||||
|
||||
create_app(app)
|
||||
app.wsgi_app = WhiteNoise(app.wsgi_app, STATIC_ROOT, STATIC_URL)
|
||||
app.wsgi_app = WhiteNoise(app.wsgi_app, STATIC_ROOT, STATIC_URL, max_age=WhiteNoise.FOREVER)
|
||||
|
||||
Reference in New Issue
Block a user