singhankur01 commited on
Commit
37bcdcb
·
verified ·
1 Parent(s): b0a1700

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -175,12 +175,13 @@ app = FastAPI(title="HackRX RAG Server", lifespan=lifespan)
175
 
176
  # --- 3. API Key Verification ---
177
  TEAM_API_KEY = os.getenv("TEAM_API_KEY")
 
178
 
179
  def verify_api_key(authorization: str = Header(...)):
180
  if not authorization.startswith("Bearer "):
181
  raise HTTPException(status_code=401, detail="Invalid Authorization header format")
182
  token = authorization.split("Bearer ")[1]
183
- if token != TEAM_API_KEY:
184
  raise HTTPException(status_code=403, detail="Invalid or missing API key")
185
 
186
 
 
175
 
176
  # --- 3. API Key Verification ---
177
  TEAM_API_KEY = os.getenv("TEAM_API_KEY")
178
+ TEAM_API_KEY2 = os.getenv("TEAM_API_KEY2")
179
 
180
  def verify_api_key(authorization: str = Header(...)):
181
  if not authorization.startswith("Bearer "):
182
  raise HTTPException(status_code=401, detail="Invalid Authorization header format")
183
  token = authorization.split("Bearer ")[1]
184
+ if token != TEAM_API_KEY and token != TEAM_API_KEY2:
185
  raise HTTPException(status_code=403, detail="Invalid or missing API key")
186
 
187