Webhook encrypted tokens - Error testing when parts of the domain is masked
- Create a webhook that masks part of the domain. For example, when using
https://example.com/hello
and maskexample.com
asdomain
. - Test the webhook with any event.
- See an error that looks like below:
Proposal
Steps:
- Add a new column to the
web_hook_logs
table (e.g.url_hash
), which stores a SHA1 hash of the interpolated hook URL at the time of execution - Update the
TestHooks
services with the following:- get the
log.hook.interpolated_url
, hash it and compare it to the stored hash - if the same, then retry with the value of
log.hook.interpolated_url
- if different, error with a message that the URL has changed, and this log entry cannot be retried
- get the
- Remove the
web_hook_logs.url
column
Edited by Bojan Marjanovic