Closed rungta closed 5 years ago
Just added this, plus environment variable support, for the next release.
You can get the change ahead of time by changing your craftcms/webhooks
requirement in composer.json to:
"require": {
"craftcms/webhooks": "dev-develop#d38709eb1d4ac7dfb169865bbcc33f938255be89 as 2.2.0",
"...": "..."
}
Then run composer update
.
That was quick. Thanks @brandonkelly!
Exactly what I need when wanting to refresh cache on multisite/headless solution. However it did not seem to work until i did your trick with the composer-file @brandonkelly, despite docs says it should work which confused me a bit. Is this maybe forgotten to be released or coming up in a later version? (I noticed the 2.2.0 release here is from 29 of july and the fix is made in august)
Webhooks 2.3.0 is out now with this change.
It would be useful if the webhook URL can also be set dynamically and had access to the
event
variable that triggered it. That would enable use cases such as automatically purging and/or warming cache after an entry is saved.Where
/_purge/<url>
would purge the Nginx FastCGI cache for<url>
. Similarly, we could request that page again via a webhook in order to warm up the cache.