[GH-ISSUE #2850] Enforcing the passthrough of the HTTP-Proxy to the Ollama API client breaks functionality #67643

Closed
opened 2026-05-12 23:49:11 -05:00 by GiteaMirror · 6 comments
Owner

Originally created by @PierreSchwang on GitHub (Jun 5, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/2850

Bug Report

Description

Bug Summary:
Since https://github.com/open-webui/open-webui/pull/2799 was merged (latest release) the http(s)_proxy environment variable(s) are passed through to the ollama and open api http clients as is. This breaks functionality in professional networking environments, as the proxy is required to load e.g. external websites (using #https://google.com for example) but will fail to proxy requests in the internal network - which is the case in our setup. Open-WebUI will try to request a local IP through that proxy and obviously fails.

Steps to Reproduce:
Use a Proxy, which will proxy requests to external services but rejects internal addresses.

Expected Behavior:
It should be configurable if the proxy environment variable is passed to the http client(s)

Actual Behavior:
All environment variables are used as-is.

Environment

  • Open WebUI Version: v0.2.4

  • Ollama (if applicable): -

  • Operating System: -

  • Browser (if applicable): -

Reproduction Details

Confirmation:

  • I have read and followed all the instructions provided in the README.md.
  • I am on the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.

Installation Method

Docker.

Additional Information

N/A

Note

If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!

Originally created by @PierreSchwang on GitHub (Jun 5, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/2850 # Bug Report ## Description **Bug Summary:** Since https://github.com/open-webui/open-webui/pull/2799 was merged (latest release) the http(s)_proxy environment variable(s) are passed through to the ollama and open api http clients as is. This breaks functionality in professional networking environments, as the proxy is required to load e.g. external websites (using `#https://google.com` for example) but will fail to proxy requests in the internal network - which is the case in our setup. Open-WebUI will try to request a local IP through that proxy and obviously fails. **Steps to Reproduce:** Use a Proxy, which will proxy requests to external services but rejects internal addresses. **Expected Behavior:** It should be configurable if the proxy environment variable is passed to the http client(s) **Actual Behavior:** All environment variables are used as-is. ## Environment - **Open WebUI Version:** v0.2.4 - **Ollama (if applicable):** - - **Operating System:** - - **Browser (if applicable):** - ## Reproduction Details **Confirmation:** - [x] I have read and followed all the instructions provided in the README.md. - [x] I am on the latest version of both Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. ## Installation Method Docker. ## Additional Information N/A ## Note If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!
Author
Owner

@tjbck commented on GitHub (Jun 5, 2024):

@mindspawn

<!-- gh-comment-id:2150423581 --> @tjbck commented on GitHub (Jun 5, 2024): @mindspawn
Author
Owner

@mindspawn commented on GitHub (Jun 5, 2024):

You can use no_proxy environment variable to bypass the proxy for specific internal hosts?
It does also support wildcards.

<!-- gh-comment-id:2150430292 --> @mindspawn commented on GitHub (Jun 5, 2024): You can use no_proxy environment variable to bypass the proxy for specific internal hosts? It does also support wildcards.
Author
Owner

@PierreSchwang commented on GitHub (Jun 5, 2024):

Should be documented somewhere then. no_proxy is no standardized environment variable but seems to be supported by aiohttp at least. will try tomorrow

<!-- gh-comment-id:2150447421 --> @PierreSchwang commented on GitHub (Jun 5, 2024): Should be documented somewhere then. no_proxy is no standardized environment variable but seems to be supported by aiohttp at least. will try tomorrow
Author
Owner

@mindspawn commented on GitHub (Jun 5, 2024):

http_proxy, https_proxy, ftp_proxy and no_proxy are pretty much standard on any Linux distribution and not specific to open-webui. Matter of fact even Windows supports it.

Most underlying libraries honor it e.g. requests library which is also used in open-webui. open-webui has recently been switching some of the requests module calls to aiohttp and this caused the expected Linux distribution behavior to break hence this change.

There is quite a bit of documentation on these 3 env variables e.g. wget: https://www.gnu.org/software/wget/manual/html_node/Proxies.html

Additional References:
docker container proxy (same variables): https://docs.docker.com/network/proxy/
aiohttp: https://docs.aiohttp.org/en/stable/client_advanced.html
requests: https://requests.readthedocs.io/en/latest/user/advanced/

<!-- gh-comment-id:2150465752 --> @mindspawn commented on GitHub (Jun 5, 2024): http_proxy, https_proxy, ftp_proxy and no_proxy are pretty much standard on any Linux distribution and not specific to open-webui. Matter of fact even Windows supports it. Most underlying libraries honor it e.g. requests library which is also used in open-webui. open-webui has recently been switching some of the requests module calls to aiohttp and this caused the expected Linux distribution behavior to break hence this change. There is quite a bit of documentation on these 3 env variables e.g. wget: https://www.gnu.org/software/wget/manual/html_node/Proxies.html Additional References: docker container proxy (same variables): https://docs.docker.com/network/proxy/ aiohttp: https://docs.aiohttp.org/en/stable/client_advanced.html requests: https://requests.readthedocs.io/en/latest/user/advanced/
Author
Owner

@mindspawn commented on GitHub (Jun 5, 2024):

@tjbck please let me know your preference. If you feel this should be additionally covered in https://docs.openwebui.com/getting-started/env-configuration/ I can help write something up. Although the page seems to only cover variables defined and used by open-webui not general purpose system variables. I am ok with whatever you prefer :)

<!-- gh-comment-id:2150478254 --> @mindspawn commented on GitHub (Jun 5, 2024): @tjbck please let me know your preference. If you feel this should be additionally covered in https://docs.openwebui.com/getting-started/env-configuration/ I can help write something up. Although the page seems to only cover variables defined and used by open-webui not general purpose system variables. I am ok with whatever you prefer :)
Author
Owner

@tjbck commented on GitHub (Jun 5, 2024):

@mindspawn feel free to create a new section that covers misc env vars at the bottom!

<!-- gh-comment-id:2150531630 --> @tjbck commented on GitHub (Jun 5, 2024): @mindspawn feel free to create a new section that covers misc env vars at the bottom!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#67643