Spaces:
Sleeping
Sleeping
Commit ·
375ea37
1
Parent(s): 660c58b
try 3
Browse files- app/api/api.py +4 -1
app/api/api.py
CHANGED
|
@@ -56,7 +56,7 @@ api = FastAPI()
|
|
| 56 |
rag = initialize_rag()
|
| 57 |
|
| 58 |
origins = [
|
| 59 |
-
"
|
| 60 |
]
|
| 61 |
|
| 62 |
api.add_middleware(
|
|
@@ -98,6 +98,9 @@ async def require_user(request: Request, call_next):
|
|
| 98 |
):
|
| 99 |
return await call_next(request)
|
| 100 |
|
|
|
|
|
|
|
|
|
|
| 101 |
user = get_current_user(request)
|
| 102 |
authorized = True
|
| 103 |
if user is None:
|
|
|
|
| 56 |
rag = initialize_rag()
|
| 57 |
|
| 58 |
origins = [
|
| 59 |
+
"*",
|
| 60 |
]
|
| 61 |
|
| 62 |
api.add_middleware(
|
|
|
|
| 98 |
):
|
| 99 |
return await call_next(request)
|
| 100 |
|
| 101 |
+
if stripped_path == "None":
|
| 102 |
+
return await last_user_chat(request)
|
| 103 |
+
|
| 104 |
user = get_current_user(request)
|
| 105 |
authorized = True
|
| 106 |
if user is None:
|