[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user