Procházet zdrojové kódy

Merge pull request #1142 from tranvansang/patch-3

Fix: socket does not handle server.path option
Ifedapo .A. Olarewaju před 6 roky
rodič
revize
79156463ce
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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')
 
     /**