From 4f8f327cb68a138101cfc8d7fc000c00f237ffea Mon Sep 17 00:00:00 2001 From: Place Jean-Marie Date: Sat, 11 Dec 2021 17:20:34 +0100 Subject: [PATCH] disable cache for logos objects --- app/views/scodoc.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/views/scodoc.py b/app/views/scodoc.py index d875dc8e4..c46c4b394 100644 --- a/app/views/scodoc.py +++ b/app/views/scodoc.py @@ -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)