Ver Fonte

Removed hardcoded websocket url

Harry Hedger há 8 anos atrás
pai
commit
23cf2e7778
1 ficheiros alterados com 3 adições e 1 exclusões
  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', () => {