瀏覽代碼

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', () => {