Spaces:
Sleeping
Sleeping
Update components/middleware.py
Browse files- components/middleware.py +2 -2
components/middleware.py
CHANGED
|
@@ -293,7 +293,7 @@ class x401Kit(BaseHTTPMiddleware):
|
|
| 293 |
elif tokenverify==False:
|
| 294 |
return JSONResponse(
|
| 295 |
content={"status": "error", "message": "Missing required token"},
|
| 296 |
-
status_code=
|
| 297 |
headers={
|
| 298 |
"Access-Control-Allow-Origin": "*",
|
| 299 |
"Access-Control-Allow-Credentials": "true"
|
|
@@ -317,7 +317,7 @@ class x401Kit(BaseHTTPMiddleware):
|
|
| 317 |
else:
|
| 318 |
return JSONResponse(
|
| 319 |
content={"status": "error", "message": "Authentication failed"},
|
| 320 |
-
status_code=
|
| 321 |
headers={
|
| 322 |
"Access-Control-Allow-Origin": "*",
|
| 323 |
"Access-Control-Allow-Credentials": "true"
|
|
|
|
| 293 |
elif tokenverify==False:
|
| 294 |
return JSONResponse(
|
| 295 |
content={"status": "error", "message": "Missing required token"},
|
| 296 |
+
status_code=500,
|
| 297 |
headers={
|
| 298 |
"Access-Control-Allow-Origin": "*",
|
| 299 |
"Access-Control-Allow-Credentials": "true"
|
|
|
|
| 317 |
else:
|
| 318 |
return JSONResponse(
|
| 319 |
content={"status": "error", "message": "Authentication failed"},
|
| 320 |
+
status_code=500,
|
| 321 |
headers={
|
| 322 |
"Access-Control-Allow-Origin": "*",
|
| 323 |
"Access-Control-Allow-Credentials": "true"
|