Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
orcahmlee opened this issue Aug 27, 2024 · 0 comments

Comments

@orcahmlee
Copy link

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.

@qdrant qdrant deleted a comment Aug 27, 2024
@qdrant qdrant deleted a comment Aug 27, 2024
@qdrant qdrant deleted a comment Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@orcahmlee and others