forked from open-webui/open-webui
feat: multi-user support w/ RBAC
This commit is contained in:
parent
31e38df0a5
commit
921eef03b3
21 changed files with 1815 additions and 66 deletions
|
@ -1,16 +1,14 @@
|
|||
import time
|
||||
import sys
|
||||
|
||||
from fastapi import FastAPI, Request
|
||||
from fastapi.staticfiles import StaticFiles
|
||||
|
||||
from fastapi import HTTPException
|
||||
from starlette.exceptions import HTTPException as StarletteHTTPException
|
||||
|
||||
from fastapi.middleware.wsgi import WSGIMiddleware
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
from starlette.exceptions import HTTPException as StarletteHTTPException
|
||||
|
||||
from apps.ollama.main import app as ollama_app
|
||||
from apps.web.main import app as webui_app
|
||||
|
||||
import time
|
||||
|
||||
|
||||
class SPAStaticFiles(StaticFiles):
|
||||
|
@ -47,5 +45,6 @@ async def check_url(request: Request, call_next):
|
|||
return response
|
||||
|
||||
|
||||
app.mount("/api/v1", webui_app)
|
||||
app.mount("/ollama/api", WSGIMiddleware(ollama_app))
|
||||
app.mount("/", SPAStaticFiles(directory="../build", html=True), name="spa-static-files")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue