qdrant-js
qdrant-js copied to clipboard
URL path is removed
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
Another issue problem with this kind of setup is that qdrant dashboard doesn't work. This is because the dashboard queries embeddings from localhost:6333. Without the relative /qdrant path.
note: I am not sysadmin expert so my setup might not be the standard one
there is a similar open issue:
https://github.com/qdrant/qdrant-web-ui/issues/94