From 6bae16b788af252a4b65708d37bd1291a2d80d34 Mon Sep 17 00:00:00 2001 From: Kiril Vangelovski Date: Mon, 8 Apr 2019 20:12:46 +0000 Subject: [PATCH] [FIX] hw_screen: Mixed Content when loading with https The protocol is hardcoded to `http` in the url for the longpolling request (/point_of_sale/get_serialized_order). It should match the same protocol as the page was loaded in to avoid Mixed Content errors. closes odoo/odoo#32528 Signed-off-by: Quentin Lejeune (qle) --- addons/hw_screen/static/src/js/worker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hw_screen/static/src/js/worker.js b/addons/hw_screen/static/src/js/worker.js index 4031e85cf52..80c9d3a6d78 100644 --- a/addons/hw_screen/static/src/js/worker.js +++ b/addons/hw_screen/static/src/js/worker.js @@ -9,7 +9,7 @@ function longpolling() { $.ajax({ type: 'POST', - url: 'http://'+window.location.host+'/point_of_sale/get_serialized_order', + url: window.location.origin+'/point_of_sale/get_serialized_order', dataType: 'json', beforeSend: function(xhr){xhr.setRequestHeader('Content-Type', 'application/json');}, data: JSON.stringify({jsonrpc: '2.0'}),