Hi,
When configuring the Qdrant server URL without a path, everything works as expected:
https://my-qdrant ✅
→ The Qdrant API functions correctly.
However, when the server URL includes a subpath:
https://my-qdrant/path1/path2 ❌
→ The Qdrant API ignores /path1/path2, and requests are sent as if the base path did not exist.
Root cause
This behavior seems to be caused by the use of a leading / in the url argument passed to urljoin.
A leading slash causes urljoin to override the base path entirely, instead of appending to it.
Example from qdrant_client/http/api/points_api.py:
return self.api_client.request(
type_=m.InlineResponse20016,
method="POST",
url="/collections/{collection_name}/points/scroll",
headers=headers if headers else None,
path_params=path_params,
params=query_params,
content=body,
)
Because the url starts with /, any path defined in the base server URL (e.g. /path1/path2) is discarded.
Proposed change
Remove the leading slash so that the endpoint is correctly appended to the base URL:
return self.api_client.request(
type_=m.InlineResponse20016,
method="POST",
url="collections/{collection_name}/points/scroll",
headers=headers if headers else None,
path_params=path_params,
params=query_params,
content=body,
)
This change would allow Qdrant to work correctly when deployed behind a reverse proxy or under a subpath.
Hi,
When configuring the Qdrant server URL without a path, everything works as expected:
https://my-qdrant✅→ The Qdrant API functions correctly.
However, when the server URL includes a subpath:
https://my-qdrant/path1/path2❌→ The Qdrant API ignores
/path1/path2, and requests are sent as if the base path did not exist.Root cause
This behavior seems to be caused by the use of a leading
/in theurlargument passed tourljoin.A leading slash causes
urljointo override the base path entirely, instead of appending to it.Example from
qdrant_client/http/api/points_api.py:Because the
urlstarts with/, any path defined in the base server URL (e.g./path1/path2) is discarded.Proposed change
Remove the leading slash so that the endpoint is correctly appended to the base URL:
This change would allow Qdrant to work correctly when deployed behind a reverse proxy or under a subpath.