소스 검색

Merge pull request #1142 from tranvansang/patch-3

Fix: socket does not handle server.path option
Ifedapo .A. Olarewaju 6 년 전
부모
커밋
79156463ce
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      packages/@uppy/companion/src/uppy.js

+ 1 - 1
packages/@uppy/companion/src/uppy.js

@@ -117,7 +117,7 @@ module.exports.socket = (server) => {
     const fullPath = ws.upgradeReq.url
     // the token identifies which ongoing upload's progress, the socket
     // connection wishes to listen to.
-    const token = fullPath.replace(/\/api\//, '')
+    const token = fullPath.replace(/^.*\/api\//, '')
     logger.info(`connection received from ${token}`, 'socket.connect')
 
     /**