Skip to content

Commit

Permalink
use max_age instead of cache_timeout (for flask > 2.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
BuckarooBanzay authored May 5, 2023
1 parent 218f8d9 commit 6fba704
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Flask>=1.1.0
Flask>=2.0.0
maxminddb>=2.0.0
3 changes: 1 addition & 2 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 6fba704

Please sign in to comment.