forked from ScoDoc/ScoDoc
disable cache for logos objects
This commit is contained in:
parent
8a5c4b5ced
commit
4f8f327cb6
@ -30,6 +30,7 @@ Module main: page d'accueil, avec liste des départements
|
||||
|
||||
Emmanuel Viennet, 2021
|
||||
"""
|
||||
import datetime
|
||||
import io
|
||||
|
||||
import wtforms.validators
|
||||
@ -231,7 +232,11 @@ def _return_logo(name="header", dept_id="", small=False, strict: bool = True):
|
||||
stream.seek(0)
|
||||
return send_file(stream, mimetype=f"image/{fmt}")
|
||||
else:
|
||||
return send_file(logo.filepath, mimetype=f"image/{suffix}")
|
||||
return send_file(
|
||||
logo.filepath,
|
||||
mimetype=f"image/{suffix}",
|
||||
last_modified=datetime.datetime.now(),
|
||||
)
|
||||
else:
|
||||
abort(404)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user