singhankur01 commited on
Commit
557efda
·
verified ·
1 Parent(s): 8c7c362

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -99,10 +99,13 @@ app = FastAPI(title="HackRX RAG Server", lifespan=lifespan)
99
 
100
  # --- 3. API Key Verification ---
101
  TEAM_API_KEY = os.getenv("TEAM_API_KEY")
 
102
  def verify_api_key(authorization: str = Header(...)):
103
  if not authorization.startswith("Bearer "):
104
  raise HTTPException(status_code=401, detail="Invalid Authorization header format")
105
  token = authorization.split("Bearer ")[1]
 
 
106
  if token != TEAM_API_KEY:
107
  raise HTTPException(status_code=403, detail="Invalid or missing API key")
108
 
 
99
 
100
  # --- 3. API Key Verification ---
101
  TEAM_API_KEY = os.getenv("TEAM_API_KEY")
102
+
103
  def verify_api_key(authorization: str = Header(...)):
104
  if not authorization.startswith("Bearer "):
105
  raise HTTPException(status_code=401, detail="Invalid Authorization header format")
106
  token = authorization.split("Bearer ")[1]
107
+ print(token)
108
+ print(TEAM_API_KEY)
109
  if token != TEAM_API_KEY:
110
  raise HTTPException(status_code=403, detail="Invalid or missing API key")
111