Redirect Url Service Notifications in v13

I need to create a custom webhook for notifications of when a new Redirect Url is added or removed. In order to implement this I need to create some custom notifications but for all of this to work as expected those notifications will need to fire when the register and delete operations occur in the RedirectUrlService. There is just one small problem - RedirectUrlService is internal and there are currently no notifications in this service that I can see.

Is my only option here to implement my own IRedirectUrlService? I was kind of hoping I could inherit the core one and do what I needed but I don’t think I can do that.

1 Like

I’m afraid you’ll need to roll your own IRedirectUrlService. Fortunately the RedirectUrlService is only a thin wrapper around the IRedirectUrlRepository so there’s not a lot to duplicate.

I suspect adding notifications and/or webhook support to the RedirectUrlService would be a welcome PR to Umbraco too - this is becoming more important with headless setups and for offloading redirects to edge servers.

1 Like

@JasonElkin Thank you for your reply. Happy to submit a PR for this if there is a chance it can make it into v13.

I’m not too concerned about the amount of work to duplicate in a custom RedirectUrlService it is more that the code will almost certainly deviate from the core down the line and so a direct inheritance would have been preferred.