add cache header to static

This commit is contained in:
2021-07-24 13:23:05 +02:00
parent bdd7d9bf01
commit 8f7b1b47ac

View File

@@ -272,7 +272,9 @@ def leaderboard():
@app.route('/static/<path:path>')
def send_js(path):
return send_from_directory('static', path)
response = send_from_directory('static', path)
response.headers['Cache-Control'] = "max-age=2592000"
return response
@app.before_first_request
def init():