pagezyhf HF Staff commited on
Commit
2841ec3
·
verified ·
1 Parent(s): d892c54

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -2
main.py CHANGED
@@ -99,8 +99,8 @@ app = FastAPI()
99
  @app.post("/webhook")
100
  async def webhook(request: Request):
101
  logger.info(f"Received webhook request from {request.client.host}")
102
- if not MODEL_CATALOG_WEBHOOK_SECRET:
103
- logger.warning("MODEL_CATALOG_WEBHOOK_SECRET is not set")
104
  if request.headers.get("X-Webhook-Secret") not in {MODEL_CATALOG_WEBHOOK_SECRET, SIMSHIP_WEBHOOK_SECRET}:
105
  logger.warning("Invalid webhook secret received")
106
  return Response("Invalid secret", status_code=401)
 
99
  @app.post("/webhook")
100
  async def webhook(request: Request):
101
  logger.info(f"Received webhook request from {request.client.host}")
102
+ logger.info(f"{MODEL_CATALOG_WEBHOOK_SECRET}")
103
+ logger.info(f"{request.headers.get("X-Webhook-Secret")}")
104
  if request.headers.get("X-Webhook-Secret") not in {MODEL_CATALOG_WEBHOOK_SECRET, SIMSHIP_WEBHOOK_SECRET}:
105
  logger.warning("Invalid webhook secret received")
106
  return Response("Invalid secret", status_code=401)