mirror of
https://github.com/FAUSheppy/open-web-leaderboard.git
synced 2025-12-06 07:01:36 +01:00
add cache header to static
This commit is contained in:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user