mirror of
https://github.com/cwinfo/yggdrasil-map
synced 2024-11-22 11:40:28 +00:00
set max_age in cache headers
This commit is contained in:
parent
1805f55cf9
commit
5eb884bdc8
@ -41,5 +41,10 @@ def page_sendGraph():
|
|||||||
else:
|
else:
|
||||||
return 'Error: %s' % ret
|
return 'Error: %s' % ret
|
||||||
|
|
||||||
|
@app.after_request
|
||||||
|
def add_header(response):
|
||||||
|
response.cache_control.max_age = 300
|
||||||
|
return response
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
app.run(host='localhost', port=3000)
|
app.run(host='localhost', port=3000)
|
||||||
|
Loading…
Reference in New Issue
Block a user