qdrant-js icon indicating copy to clipboard operation
qdrant-js copied to clipboard

URL path is removed

Open tonisives opened this issue 4 months ago • 2 comments

I am using nginx to proxy connection to qdrant node via /qdrant path.

The qdrant library seems to remove the path from url:

  new QdrantClient({
    url: "http://{ip}:6333/qdrant",
    apiKey: process.env.QDRANT_API_KEY,
  })

this returns 404. As you can see, the /qdrant path is removed

  url: 'http://{ip}:6333/collections/ah-00000000-b9b5-findings',
  status: 404,
  statusText: 'Not Found',
  data: '<html>\r\n' +
    '<head><title>404 Not Found</title></head>\r\n' +
    '<body>\r\n' +
    '<center><h1>404 Not Found</h1></center>\r\n' +
    '<hr><center>nginx/1.25.4</center>\r\n' +
    '</body>\r\n' +
    '</html>\r\n'
}

If I use the prefix variable, then the request is successful

  new QdrantClient({
    url: "http://{ip}:6333",
    prefix: "/qdrant",
    apiKey: process.env.QDRANT_API_KEY,
  })

qdrant.js: 1.7.0

tonisives avatar Feb 29 '24 06:02 tonisives