mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-04 17:51:20 +01:00
feat: backend reverse proxy
This commit is contained in:
15
backend/config.py
Normal file
15
backend/config.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import sys
|
||||
import os
|
||||
from dotenv import load_dotenv, find_dotenv
|
||||
|
||||
load_dotenv(find_dotenv())
|
||||
|
||||
ENV = os.environ.get("ENV", "dev")
|
||||
|
||||
OLLAMA_API_BASE_URL = os.environ.get(
|
||||
"OLLAMA_API_BASE_URL", "http://localhost:11434/api"
|
||||
)
|
||||
|
||||
if ENV == "prod":
|
||||
if OLLAMA_API_BASE_URL == "/ollama/api":
|
||||
OLLAMA_API_BASE_URL = "http://host.docker.internal:11434/api"
|
||||
Reference in New Issue
Block a user