mirror of
https://github.com/ad1217/PrinterStatus
synced 2024-11-13 03:53:29 -05:00
Fix websocket URI generation
This commit is contained in:
parent
746e3fcd7e
commit
a852eaedd3
@ -27,7 +27,7 @@ export default class App extends Vue {
|
||||
mounted() {
|
||||
let loc = window.location;
|
||||
const ws_uri: string =
|
||||
loc.protocol === 'https' ? 'wss://' : 'ws://' + loc.host + '/ws';
|
||||
(loc.protocol === 'https:' ? 'wss://' : 'ws://') + loc.host + '/ws';
|
||||
this.websocket = new WebSocket(ws_uri);
|
||||
this.websocket.onmessage = (ev: MessageEvent) => {
|
||||
const event: messages.ExtendedMessage = JSON.parse(ev.data as string);
|
||||
|
Loading…
Reference in New Issue
Block a user