mirror of
https://github.com/morpheus65535/bazarr
synced 2025-01-30 19:02:34 +00:00
Check for SSL when opening websocket connection.
This commit is contained in:
parent
368dc7e379
commit
d0ada2f16a
1 changed files with 7 additions and 1 deletions
|
@ -211,7 +211,13 @@
|
|||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
var ws = new WebSocket("ws://" + window.location.host + "{{base_url}}websocket");
|
||||
if (location.protocol != 'https:')
|
||||
{
|
||||
var ws = new WebSocket("ws://" + window.location.host + "{{base_url}}websocket");
|
||||
} else {
|
||||
var ws = new WebSocket("wss://" + window.location.host + "{{base_url}}websocket");
|
||||
}
|
||||
|
||||
ws.onmessage = function (evt) {
|
||||
new Noty({
|
||||
text: evt.data,
|
||||
|
|
Loading…
Reference in a new issue