Initial commit of document-service

This commit is contained in:
2026-04-23 16:20:58 -05:00
commit 51d60f0032
30 changed files with 4357 additions and 0 deletions

View File

16
app/middleware/auth.py Normal file
View File

@@ -0,0 +1,16 @@
from fastapi import Request
from starlette.middleware.base import BaseHTTPMiddleware
from starlette.responses import JSONResponse
from app.logger import get_logger
logger = get_logger(__name__)
class AuthMiddleware(BaseHTTPMiddleware):
async def dispatch(self, request: Request, call_next):
# Skip auth for health endpoint
if request.url.path == "/health":
return await call_next(request)
request.state.org_id = "test"
response = await call_next(request)
return response