|
@@ -342,6 +342,7 @@ from open_webui.env import (
|
|
|
RESET_CONFIG_ON_START,
|
|
|
OFFLINE_MODE,
|
|
|
ENABLE_OTEL,
|
|
|
+ EXTERNAL_PWA_MANIFEST_URL,
|
|
|
)
|
|
|
|
|
|
|
|
@@ -567,6 +568,7 @@ app.state.config.LDAP_CIPHERS = LDAP_CIPHERS
|
|
|
|
|
|
app.state.AUTH_TRUSTED_EMAIL_HEADER = WEBUI_AUTH_TRUSTED_EMAIL_HEADER
|
|
|
app.state.AUTH_TRUSTED_NAME_HEADER = WEBUI_AUTH_TRUSTED_NAME_HEADER
|
|
|
+app.state.EXTERNAL_PWA_MANIFEST_URL = EXTERNAL_PWA_MANIFEST_URL
|
|
|
|
|
|
app.state.USER_COUNT = None
|
|
|
app.state.TOOLS = {}
|
|
@@ -1398,29 +1400,32 @@ async def oauth_callback(provider: str, request: Request, response: Response):
|
|
|
|
|
|
@app.get("/manifest.json")
|
|
|
async def get_manifest_json():
|
|
|
- return {
|
|
|
- "name": app.state.WEBUI_NAME,
|
|
|
- "short_name": app.state.WEBUI_NAME,
|
|
|
- "description": "Open WebUI is an open, extensible, user-friendly interface for AI that adapts to your workflow.",
|
|
|
- "start_url": "/",
|
|
|
- "display": "standalone",
|
|
|
- "background_color": "#343541",
|
|
|
- "orientation": "natural",
|
|
|
- "icons": [
|
|
|
- {
|
|
|
- "src": "/static/logo.png",
|
|
|
- "type": "image/png",
|
|
|
- "sizes": "500x500",
|
|
|
- "purpose": "any",
|
|
|
- },
|
|
|
- {
|
|
|
- "src": "/static/logo.png",
|
|
|
- "type": "image/png",
|
|
|
- "sizes": "500x500",
|
|
|
- "purpose": "maskable",
|
|
|
- },
|
|
|
- ],
|
|
|
- }
|
|
|
+ if app.state.EXTERNAL_PWA_MANIFEST_URL:
|
|
|
+ return requests.get(app.state.EXTERNAL_PWA_MANIFEST_URL).json()
|
|
|
+ else:
|
|
|
+ return {
|
|
|
+ "name": app.state.WEBUI_NAME,
|
|
|
+ "short_name": app.state.WEBUI_NAME,
|
|
|
+ "description": "Open WebUI is an open, extensible, user-friendly interface for AI that adapts to your workflow.",
|
|
|
+ "start_url": "/",
|
|
|
+ "display": "standalone",
|
|
|
+ "background_color": "#343541",
|
|
|
+ "orientation": "natural",
|
|
|
+ "icons": [
|
|
|
+ {
|
|
|
+ "src": "/static/logo.png",
|
|
|
+ "type": "image/png",
|
|
|
+ "sizes": "500x500",
|
|
|
+ "purpose": "any",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "src": "/static/logo.png",
|
|
|
+ "type": "image/png",
|
|
|
+ "sizes": "500x500",
|
|
|
+ "purpose": "maskable",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ }
|
|
|
|
|
|
|
|
|
@app.get("/opensearch.xml")
|