diff --git a/client/src/neko/index.ts b/client/src/neko/index.ts index 6ef7dd4a..d5058a6c 100644 --- a/client/src/neko/index.ts +++ b/client/src/neko/index.ts @@ -34,7 +34,7 @@ export class NekoClient extends BaseClient implements EventEmitter { const url = process.env.NODE_ENV === 'development' ? `ws://${location.host.split(':')[0]}:${process.env.VUE_APP_SERVER_PORT}/ws` - : location.href.replace(/^http/, 'ws').replace(/\/$/, '')+'/ws' + : location.protocol.replace(/^http/, 'ws') + '//' + location.host + location.pathname.replace(/\/$/, '') + '/ws' this.initWithURL(vue, url) }