nazr commited on
Commit
e41ef67
·
1 Parent(s): f2968f8

api key logging

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -47,6 +47,8 @@ async def document_index(request: DocumentIndexRequest, x_api_key: str = Header(
47
  start_time = time.time()
48
  # Check if the API key provided in the header matches the one in the environment
49
  if x_api_key != API_KEY:
 
 
50
  logging.warning("Unauthorized access attempt with invalid API key.")
51
  raise HTTPException(status_code=401, detail="Unauthorized")
52
 
 
47
  start_time = time.time()
48
  # Check if the API key provided in the header matches the one in the environment
49
  if x_api_key != API_KEY:
50
+ logging.info(x_api_key)
51
+ logging.info(API_KEY)
52
  logging.warning("Unauthorized access attempt with invalid API key.")
53
  raise HTTPException(status_code=401, detail="Unauthorized")
54