Closed Expecho closed 7 years ago
Good question -- I'll have to look at it.
This would be a big help to better fit with our overall routing scheme.
Hey guys, we also require to modify the route prefixes since we already have the /api and also an API versioning system that interferes with the hard-codded prefixes. As a workaround I've created a new controller on my project extending the WebHooks Controllers.
/// <summary>
/// Overriding this controller to override the route prefix..
/// </summary>
[Authorize]
[RoutePrefix("webhooks/filters")]
public class WebHookFiltersController
: Microsoft.AspNet.WebHooks.Controllers.WebHookFiltersController
{
}
Thanks, Leo.
Ok, I will make it easier to write you own controller and then call into a helper for registration utils. This should help make it easier to get the behavior you want. Will send out an update when ready!
I just committed 757530d2af40da1d51e0cf387595561e1e5cebf0 which makes it much simpler to write your own WebHook registration mechanism whether that is a separate API controller, an MVC controller, or something else entirely. This also gives you full control over how much verification you want to do. Please see the commit for details -- you might be able to look at the existing WebHookRegistrationsController.cs for an example of how it is used.
Hi,
is it possible to customize the default route prefix of the registration and filter controllers. It is now [RoutePrefix("api/webhooks/registrations")] for the WebHookRegistrationsController controller but we have a different prefix. It seems it is hardcoded in the controller. Will it be possible in the (near) future?