Open
Description
Bug Report
The parseDatabaseUrl
function completely ignores the path, these URLs are stripped from path resulting in the wrong web socket request, this happens when we use Ingress to serve the load balancer from a path deeper than the root:
neo4j://localhost/neo4j/bolt
gets transformed intolocalhost:7687
, the port change kind of makes sense since the driver assumes the default port, but the path is missing.neo4j://localhost:80/neo4j/bolt
gets transformed intolocalhost:80
which breaks because I expected the web socket request to land inws://localhost:80/neo4j/bolt
.
To be more precise what I'm doing is deploying the neo4j helm chart & then using Ingress to put the load balancer service behind a path in the cluster, it is clear in the function the query is never introduced again into the URL:
Please note that query is being passed down but the path isn't.
Location of the function: https://github.com/neo4j/neo4j-javascript-driver/blob/5.0/packages/core/src/internal/url-util.ts#L93-L108
My Environment
software name | version |
---|---|
OS | Windows 10 WSL2 Ubuntu |
Web browser | Chrome 113.0.5672.129 |
node.js | lts/gallium 16.20.0 |
npm | 8.19.4 |
yarn | 1.22.19 |
Neo4j Browser | neo4j/neo4j-browser#1922 |
Neo4j | - |