qdrant / qdrant/qdrant-client

[Proposal] Automatically add Url.port and Url.path to rest_uri when the url parameter is behind a proxy

Open
#755 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.4k
Forks
304
Avg merge
2d 9h
Merged PRs (30d)
37

Description

I've deploy a Qdrant service on a GKE and our team use the APISix as a proxy service. Therefore, the Qdrant service I deployed has to access by this url: https://<MY_HOST>/qdrant.

I tried to use the Python client to connect the server but failed after I did make sure I could use the curl to access the RESTful API.

    # this not works
    client = QdrantClient(
        url="https://<MY_HOST>/qdrant",
    )
    client.info()

After digging some docs and source, I realized I had to set the port and prefix both for my url.

    # this works
    client = QdrantClient(
        url="https://<MY_HOST>",
        port=443,
        prefix="qdrant",
    )
    client.info()

The proposal are:

  • reassign the prefix when the url contains a Url.path
  • reassign the port when Url.schema is https

If this is reasonable, I'm wiling to provide a PR for this feature.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at QdrantClient URL handling and the construction of rest_uri, then inspect how Url.path, Url.port, and Url.schema are currently used. Define the expected behavior for proxied HTTPS URLs and verify that client.info() reaches a URL such as https://<MY_HOST>/qdrant without separately supplying port and prefix.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.