Преглед изворни кода

Removed hardcoded websocket url

Harry Hedger пре 8 година
родитељ
комит
23cf2e7778
1 измењених фајлова са 3 додато и 1 уклоњено
  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', () => {