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

Client fails to query resources behind reverse proxy path #113

Open
jpsullivan opened this issue Apr 5, 2024 · 2 comments
Open

Client fails to query resources behind reverse proxy path #113

jpsullivan opened this issue Apr 5, 2024 · 2 comments

Comments

@jpsullivan
Copy link

The _parse_host method seems to be stripping off the end of URLs that Ollama may be proxied behind. For example, if I have a rule setup in Caddy/Nginx ro forward Ollama to http://localhost:8080/ollama, the client returns "http://localhost:8080", which causes all API requests to fail as the URL is technically invalid.

@DJ4ddi
Copy link

DJ4ddi commented Apr 11, 2024

Quick fix: Open _client.py and replace the last line with:

  path = split.path or ''

  return f'{scheme}://{host}:{port}{path}'

@trollkarlen
Copy link

trollkarlen commented May 22, 2024

Is there a fix for this in the pipe ?

Also headers for auth and more in a proxy framework would be nice to add.

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

3 participants