Files
zk-data-agent/docker/web/openwebui-brand.patch
2026-07-26 13:14:30 +08:00

47 lines
1.6 KiB
Diff

diff --git a/backend/open_webui/env.py b/backend/open_webui/env.py
index 3d85f30..524f623 100644
--- a/backend/open_webui/env.py
+++ b/backend/open_webui/env.py
@@ -769,10 +769,13 @@ TRUSTED_SIGNATURE_KEY = os.getenv('TRUSTED_SIGNATURE_KEY', '')
####################################
WEBUI_NAME = os.getenv('WEBUI_NAME', 'Open WebUI')
-if WEBUI_NAME != 'Open WebUI':
+K1412_REMOVE_UPSTREAM_BRANDING = (
+ os.getenv('K1412_REMOVE_UPSTREAM_BRANDING', 'false').lower() == 'true'
+)
+if WEBUI_NAME != 'Open WebUI' and not K1412_REMOVE_UPSTREAM_BRANDING:
WEBUI_NAME += ' (Open WebUI)'
-WEBUI_FAVICON_URL = 'https://openwebui.com/favicon.png'
+WEBUI_FAVICON_URL = os.getenv('WEBUI_FAVICON_URL', '/static/favicon.png')
WEBUI_BUILD_HASH = os.getenv('WEBUI_BUILD_HASH', 'dev-build')
TRUSTED_SIGNATURE_KEY = os.getenv('TRUSTED_SIGNATURE_KEY', '')
diff --git a/src/app.html b/src/app.html
index bc3fc37..c2a42a1 100644
--- a/src/app.html
+++ b/src/app.html
@@ -115,7 +115,7 @@
})();
</script>
- <title>Open WebUI</title>
+ <title>K1412 Agent</title>
%sveltekit.head%
</head>
diff --git a/src/lib/constants.ts b/src/lib/constants.ts
index 2926448..d1a4c47 100644
--- a/src/lib/constants.ts
+++ b/src/lib/constants.ts
@@ -1,7 +1,7 @@
import { browser, dev } from '$app/environment';
// import { version } from '../../package.json';
-export const APP_NAME = 'Open WebUI';
+export const APP_NAME = 'K1412 Agent';
export const WEBUI_HOSTNAME = browser ? (dev ? `${location.hostname}:8080` : ``) : '';
export const WEBUI_BASE_URL = browser ? (dev ? `http://${WEBUI_HOSTNAME}` : ``) : ``;