Skip to content

Commit

Permalink
allow for own upload
Browse files Browse the repository at this point in the history
  • Loading branch information
robkooper committed May 1, 2024
1 parent c9b7476 commit 1209a39
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cdrhook/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,10 @@ def hook():
Our main entry point for CDR calls
"""
# check the signature
#if request.headers.get("x-cdr-signature-256"):
validate_request(request.data, request.headers.get("x-cdr-signature-256"), config["callback_secret"])
if request.headers.get("x-cdr-signature-256"):
validate_request(request.data, request.headers.get("x-cdr-signature-256"), config["callback_secret"])
elif not request.headers.get("x-cdr-signature-256") == config["callback_secret"]:
abort(403, "Request signatures didn't match!")

send_message(request.get_json(), f'{config["prefix"]}cdrhook')
return {"ok": "success"}
Expand Down

0 comments on commit 1209a39

Please sign in to comment.