From ccab5c62355946c2ee35f6728f6510a5c8559242 Mon Sep 17 00:00:00 2001 From: = <=> Date: Sun, 7 Jul 2024 17:41:31 -0400 Subject: [PATCH] simpler websocket determination --- auctions/templates/view_lot_images.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/auctions/templates/view_lot_images.html b/auctions/templates/view_lot_images.html index ef33abd..b21b96c 100755 --- a/auctions/templates/view_lot_images.html +++ b/auctions/templates/view_lot_images.html @@ -522,7 +522,7 @@ {% endif %} var viewer_bid = '{{ lot.viewer_bid }}'; const lotWebSocket = new WebSocket( - 'ws{% if not debug %}s{% endif %}://' + (window.location.protocol === 'https:') ? 'wss://' : 'ws://' + window.location.host + '/ws/lots/{{ lot.lot_number }}/' );