[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:
@@ -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'}),
|
||||
|
||||
Reference in New Issue
Block a user