Ani14 commited on
Commit
d0dbd33
·
verified ·
1 Parent(s): b98b0d0

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -153,6 +153,7 @@ async def get_debug_logs():
153
  }
154
 
155
  @app.post("/api/honeypot-detection", response_model=HoneypotResponse)
 
156
  async def honeypot_detection(
157
  request_data: HoneypotRequest,
158
  api_key: str = Depends(get_api_key)
@@ -207,14 +208,14 @@ async def honeypot_detection(
207
  }
208
 
209
  # Log the successful response body
210
- add_debug_log("OUTGOING_SUCCESS", "/api/honeypot-detection", "POST", {}, response_content)
211
 
212
  return response_content
213
 
214
  except Exception as e:
215
  error_msg = f"Internal Error: {str(e)}"
216
  logger.error(error_msg)
217
- add_debug_log("OUTGOING_ERROR", "/api/honeypot-detection", "POST", {}, {"error": error_msg})
218
  raise HTTPException(status_code=500, detail=error_msg)
219
 
220
  @app.get("/")
 
153
  }
154
 
155
  @app.post("/api/honeypot-detection", response_model=HoneypotResponse)
156
+ @app.post("/api/honeypot-detection/", response_model=HoneypotResponse)
157
  async def honeypot_detection(
158
  request_data: HoneypotRequest,
159
  api_key: str = Depends(get_api_key)
 
208
  }
209
 
210
  # Log the successful response body
211
+ add_debug_log("OUTGOING_SUCCESS", str(request.url.path), "POST", {}, response_content)
212
 
213
  return response_content
214
 
215
  except Exception as e:
216
  error_msg = f"Internal Error: {str(e)}"
217
  logger.error(error_msg)
218
+ add_debug_log("OUTGOING_ERROR", "/api/honeypot-detection/", "POST", {}, {"error": error_msg})
219
  raise HTTPException(status_code=500, detail=error_msg)
220
 
221
  @app.get("/")