kenken999 commited on
Commit
0f45d56
·
1 Parent(s): 41d07d2
Files changed (1) hide show
  1. routers/webhook.py +5 -4
routers/webhook.py CHANGED
@@ -233,11 +233,12 @@ async def webhook(request: Request):
233
  # "Authorization": f"Bearer {os.getenv('ChannelAccessToken')}",
234
  # }
235
  #r#esponse = requests.post(os.getenv("WEBHOOK_URL"), headers=headers, data=body)
236
- if not line_signature:
237
- raise HTTPException(status_code=400, detail="X-Line-Signature header is missing.")
 
238
 
239
- if not validate_signature(body.decode("utf-8"), line_signature, os.getenv("ChannelSecret")):
240
- raise HTTPException(status_code=400, detail="Invalid signature.")
241
 
242
  if not os.getenv("WEBHOOK_URL") or not os.getenv("WEBHOOK_URL").startswith("https://"):
243
  raise HTTPException(status_code=400, detail="Invalid webhook URL")
 
233
  # "Authorization": f"Bearer {os.getenv('ChannelAccessToken')}",
234
  # }
235
  #r#esponse = requests.post(os.getenv("WEBHOOK_URL"), headers=headers, data=body)
236
+
237
+ #if not line_signature:
238
+ # raise HTTPException(status_code=400, detail="X-Line-Signature header is missing.")
239
 
240
+ #if not validate_signature(body.decode("utf-8"), line_signature, os.getenv("ChannelSecret")):
241
+ # raise HTTPException(status_code=400, detail="Invalid signature.")
242
 
243
  if not os.getenv("WEBHOOK_URL") or not os.getenv("WEBHOOK_URL").startswith("https://"):
244
  raise HTTPException(status_code=400, detail="Invalid webhook URL")