[FIX] web: allow cross origin on /web/webclient/qweb

This revision is similar to edc4b0b9bb

Since revision 7f8fe10766
the route `/web/webclient/qweb` must allow cross origin
so this route can be called from HTTP pages

e.g. To allow a HTTP loaded point of sale to call this route in
HTTPS

opw-679288
This commit is contained in:
Denis Ledoux
2016-06-03 13:26:52 +02:00
parent e54fb3eb22
commit f2e9d412d1
+1 -1
View File
@@ -520,7 +520,7 @@ class WebClient(http.Controller):
headers = [('Content-Type', 'application/javascript'), ('Cache-Control', 'max-age=%s' % (36000))]
return request.make_response(momentjs_locale, headers)
@http.route('/web/webclient/qweb', type='http', auth="none")
@http.route('/web/webclient/qweb', type='http', auth="none", cors="*")
def qweb(self, mods=None, db=None):
files = [f[0] for f in manifest_glob('qweb', addons=mods, db=db)]
last_modified = get_last_modified(files)