From 71f42e274d4e0a0aefee5841703f012679ca0e88 Mon Sep 17 00:00:00 2001 From: Jeremy Kersten Date: Mon, 26 Oct 2020 18:05:58 +0000 Subject: [PATCH] [FIX] website: favicon use STATIC_CACHE_LONG that is a real year MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 365 * 24 * 60 is not a year, but year/60 ;) While we fix it, it is the good time to change and use the dedicated http.STATIC_CACHE_LONG that exists for it. closes odoo/odoo#60807 X-original-commit: bb4d5bebaf926cbdf6f8842cd1ca0e5850523bf5 Signed-off-by: Jérémy Kersten (jke) --- addons/website/controllers/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website/controllers/main.py b/addons/website/controllers/main.py index 8601eb9e03b..c94075e946b 100644 --- a/addons/website/controllers/main.py +++ b/addons/website/controllers/main.py @@ -576,5 +576,5 @@ class WebsiteBinary(http.Controller): def favicon(self, **kw): website = request.website response = request.redirect(website.image_url(website, 'favicon'), code=301) - response.headers['Cache-Control'] = 'public, max-age=%s' % (365 * 24 * 60) + response.headers['Cache-Control'] = 'public, max-age=%s' % http.STATIC_CACHE_LONG return response