[FIX] web: allow cross origin on /web/webclient/qweb
This revision is similar toedc4b0b9bbSince revision7f8fe10766the 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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user