use max_age instead of cache_timeout (for flask > 2.0)

This commit is contained in:
Buckaroo Banzai
2023-05-05 10:36:08 +02:00
committed by GitHub
parent 218f8d9bc5
commit 6fba704bb0
2 changed files with 2 additions and 3 deletions

View File

@@ -1,2 +1,2 @@
Flask>=1.1.0
Flask>=2.0.0
maxminddb>=2.0.0

View File

@@ -54,8 +54,7 @@ def index():
def list():
# We have to make sure that the list isn't cached,
# since the list isn't really static.
return send_from_directory(app.static_folder, "list.json",
cache_timeout=0)
return send_from_directory(app.static_folder, "list.json", max_age=0)
@app.route("/geoip")