webhook
webhook copied to clipboard
trigger rule for matching a parameter to a value from a file?
basically what I want to do is to store a secret key in a file that webhook would read, then compare that value to a header on the incoming webhook.
Is there a way to do that? Is there another way to do it with some other method, without hard-coding the value of the token in the hooks.json file?
webhook doesn't provide an easy way to do that, currently. Could be possible to write your own solution with https://github.com/adnanh/webhook/issues/356 once it's completed.
Two alternatives come to mind that you could use currently:
-
Set up your hook to call a wrapper that checks the headers for the secret key, which it can read from the file when the hook fires.
-
Enable hot reloading of the hooks file and have a script that transforms a base template of it by adding a comparison requirement.