mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-22 22:12:24 +01:00
Add max-age to scss endpoint
This commit is contained in:
parent
28864740a0
commit
2bd556c00d
@ -59,6 +59,8 @@ def init_app(app, input_dir='scss', dest='static', force=False, cache_dir="publi
|
||||
_convert(input_dir, scss_file, cache_file)
|
||||
app.logger.debug('Compiled %s into %s' % (scss_file, cache_file))
|
||||
|
||||
return send_from_directory(cache_dir, filepath + ".css")
|
||||
res = send_from_directory(cache_dir, filepath + ".css")
|
||||
res.headers["Cache-Control"] = "max-age=604800" # 1 week
|
||||
return res
|
||||
|
||||
app.add_url_rule("/%s/<path:filepath>.css" % dest, 'sass', _sass)
|
||||
|
Loading…
Reference in New Issue
Block a user