fix: websocket path check
This commit is contained in:
parent
fffa91d9cd
commit
cc79ecd2c5
1 changed files with 1 additions and 1 deletions
|
|
@ -54,7 +54,7 @@ const triggerWebSocket = (sessionId, dataType, data) => {
|
|||
const handleUpgrade = (request, socket, head) => {
|
||||
const baseUrl = 'ws://' + request.headers.host + '/'
|
||||
const { pathname } = new URL(request.url, baseUrl)
|
||||
if (pathname.startsWith('/ws')) {
|
||||
if (pathname.startsWith('/ws/')) {
|
||||
const sessionId = pathname.split('/')[2]
|
||||
const server = wssMap.get(sessionId)
|
||||
if (server) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue