Update webhook_listener.py
This commit is contained in:
parent
e1217cbbea
commit
f1311c7164
|
@ -33,15 +33,15 @@ def webhook():
|
|||
header_signature = request.headers.get("X-Hub-Signature")
|
||||
|
||||
if not verify_signature(payload, header_signature):
|
||||
print("⚠️ Neplatný podpis, požadavek odmítnut.")
|
||||
print(" Neplatný podpis, požadavek odmítnut.")
|
||||
abort(403)
|
||||
|
||||
event_key = request.headers.get("X-Event-Key")
|
||||
print(f"✅ Validní webhook: {event_key}")
|
||||
print(f" Validní webhook: {event_key}")
|
||||
print(request.json)
|
||||
|
||||
return "OK", 200
|
||||
|
||||
if __name__ == "__main__":
|
||||
print("🚀 Webhook listener běží na http://localhost:5000/webhook")
|
||||
print(" Webhook listener běží na http://localhost:5000/webhook")
|
||||
app.run(host="0.0.0.0", port=5000, ssl_context=("/etc/letsencrypt/live/cactus.chalupsky.org/cert.pem", "/etc/letsencrypt/live/cactus.chalupsky.org/privkey.pem"))
|
Loading…
Reference in New Issue