mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
ws relative url only path.
This commit is contained in:
parent
79e817e0b2
commit
b75303aa30
@ -34,7 +34,7 @@ export class NekoClient extends BaseClient implements EventEmitter<NekoEvents> {
|
|||||||
const url =
|
const url =
|
||||||
process.env.NODE_ENV === 'development'
|
process.env.NODE_ENV === 'development'
|
||||||
? `ws://${location.host.split(':')[0]}:${process.env.VUE_APP_SERVER_PORT}/ws`
|
? `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)
|
this.initWithURL(vue, url)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user