[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) <qle@odoo.com>
This commit is contained in:
Kiril Vangelovski
2019-04-08 20:12:46 +00:00
parent 71b590121e
commit 6bae16b788
+1 -1
View File
@@ -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'}),