Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trigger rule for matching a parameter to a value from a file? #468

Open
classabbyamp opened this issue Oct 10, 2020 · 2 comments
Open

trigger rule for matching a parameter to a value from a file? #468

classabbyamp opened this issue Oct 10, 2020 · 2 comments

Comments

@classabbyamp
Copy link

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?

@moorereason
Copy link
Collaborator

webhook doesn't provide an easy way to do that, currently. Could be possible to write your own solution with #356 once it's completed.

@PrincessRTFM
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants