From 853e13800fb030f7ae7180558cb6c3c74b843cd1 Mon Sep 17 00:00:00 2001 From: Jeremy Kersten Date: Mon, 13 Aug 2018 11:59:01 +0200 Subject: [IMP] base,web,website: asset bundle make url overridable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Allow to override the asset url generation to add in the path the website ID and avoid continue invalidation cache and bad cache by browser. Asset url is: "/web/content/{id}-{unique}/{extra}{name}{page}{type}" with: id = attachment id unique = hash extra = allow to add custom params eg: website_id/ or rtl/ name = filename page = used in css to split rules 4095 / file type = css|js Co-authored-by: Derie Romain Co-authored-by: Kersten Jérémy --- addons/web/controllers/main.py | 1 + 1 file changed, 1 insertion(+) (limited to 'addons/web/controllers') diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index a94ef8b9b76..424ba3b8910 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -1002,6 +1002,7 @@ class Binary(http.Controller): '/web/content//', '/web/content/-', '/web/content/-/', + '/web/content/-//', '/web/content///', '/web/content////'], type='http', auth="public") def content_common(self, xmlid=None, model='ir.attachment', id=None, field='datas', -- cgit v1.2.3