Explorar o código

Removed hardcoded websocket url

Harry Hedger %!s(int64=8) %!d(string=hai) anos
pai
achega
23cf2e7778
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      src/plugins/GoogleDrive.js

+ 3 - 1
src/plugins/GoogleDrive.js

@@ -39,8 +39,10 @@ export default class Google extends Plugin {
     // merge default options with the ones set by user
     this.opts = Object.assign({}, defaultOptions, opts)
 
+    const host = this.opts.host.replace(/^https?:\/\//, '')
+
     this.socket = this.core.initSocket({
-      target: 'ws://localhost:3020/'
+      target: 'ws://' + host
     })
 
     this.socket.on('google.auth.pass', () => {