wu981526092 commited on
Commit
0e5cbf1
·
1 Parent(s): 3c3bac2

Enhance authentication middleware by adding HTTPException import

Browse files

- Include HTTPException import in backend/middleware/auth.py to handle authentication errors more effectively.

Files changed (1) hide show
  1. backend/middleware/auth.py +1 -1
backend/middleware/auth.py CHANGED
@@ -8,7 +8,7 @@ Local development bypasses authentication entirely.
8
  import os
9
  import logging
10
  from typing import Optional, Dict, Any
11
- from fastapi import Request, Response
12
  from starlette.middleware.base import BaseHTTPMiddleware
13
  from starlette.responses import RedirectResponse, JSONResponse
14
  from utils.environment import should_enable_auth, get_oauth_config, is_huggingface_space
 
8
  import os
9
  import logging
10
  from typing import Optional, Dict, Any
11
+ from fastapi import Request, Response, HTTPException
12
  from starlette.middleware.base import BaseHTTPMiddleware
13
  from starlette.responses import RedirectResponse, JSONResponse
14
  from utils.environment import should_enable_auth, get_oauth_config, is_huggingface_space