diff --git a/compose/dev/nginx.conf b/compose/dev/nginx.conf index d782bb15..a7e2b5ef 100644 --- a/compose/dev/nginx.conf +++ b/compose/dev/nginx.conf @@ -12,7 +12,7 @@ server { proxy_pass http://api:4000; } location /runtime { - rewrite ^/runtime(.*)$ /$1 break; + rewrite ^/runtime(.*)$ $1 break; proxy_pass http://proxy:4010; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; @@ -28,7 +28,7 @@ server { # This is not working location /prisma { - rewrite ^/prisma(.*)$ /$1 break; + rewrite ^/prisma(.*)$ $1 break; proxy_pass http://prisma:5555; } } diff --git a/proxy/src/node-proxy.ts b/proxy/src/node-proxy.ts index 2add19fc..871a6776 100644 --- a/proxy/src/node-proxy.ts +++ b/proxy/src/node-proxy.ts @@ -307,17 +307,7 @@ function startProxyServer() { return; } console.log("proxy ws req", req.url); - if (req.url.startsWith("//")) { - // FIXME why there're two leading slashes? "//user_xxx_repo_xxx" - // UPDATE: for docker runtime, there's double slashes - // console.log("active docker connection", req.url.substring(1)); - activeTable[req.url.substring(1)] = new Date(); - } else { - // For k8s runtime, there's only one slash - // console.log("active k8s connection", req.url); - activeTable[req.url] = new Date(); - } - activeTable[req.url.substring(1)] = new Date(); + activeTable[req.url] = new Date(); let match = await getRouteTarget(req); if (!match) { return;