[FIX] website: favicon use STATIC_CACHE_LONG that is a real year

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) <jke@openerp.com>
This commit is contained in:
Jeremy Kersten
2020-10-27 10:22:56 +00:00
parent e0ec0e0369
commit 71f42e274d
+1 -1
View File
@@ -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