Skip to content
Snippets Groups Projects
Commit f6b67186 authored by ale's avatar ale
Browse files

Allow setting max_age on static files via config

Uses the SEND_FILE_MAX_AGE_DEFAULT config var for compatibility with
Flask's default static file server.
parent 168c8974
No related branches found
No related tags found
No related merge requests found
......@@ -37,6 +37,8 @@ def init_app(app, talisman):
root=pkg_resources.resource_filename(
app.import_name, 'static'),
prefix='static/',
max_age=app.config.get(
'SEND_FILE_MAX_AGE_DEFAULT', 86400*365),
)
if 'SUPPORTED_LANGUAGES' not in app.config:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment