Webhook Relay Server is a sever in which webhooks can be redirected to websockets for monitoring. The server's goal was to be able to expose web services without exposing LAN networks in a secure fashion
Features
Create webhooks for monitoring
Create bundles of webhooks to monitor
Subscribe to webhooks or bundles
Support for HTTP and HTTPS with custom ports
Limit max subscriptions per hook or bundle
Config
{
hooksPath:'/hooks',//Path to post Webhooks
hooksSubscriptionPath:'/subscribe/hooks',//Path to subscribe to Hooks
bundleSubscriptionPath:'/subscribe/bundle',//Path to subscribe to Bundles
maxSubscriptions:10,//Default Max Number of Subscriptions for Hooks/Bundles
webhookPort:80,//Port to Listen for Webhooks
subscriptionPort:80,//Port to Listen for Subscriptions
useHttps:true,//Enable HTTPS
credentials:{//Required for HTTPS
key:'secure key',//Key for HTTPS
keyFile:'credentials.key',//Alternatively can load from file
cert:'certificate',//Certificate for HTTPS
certFile:'cerdentials.cert'//Alternatively can load from file
},
webhookPortSecure:443,//Port to Listen for Webhooks on HTTPS
subscriptionPortSecure:443,//Port to Listen for Subscriptions on HTTPS
httpsOnly:false,//Only use HTTPS,
debug:false//Enables debug mode
}
Methods
addWebhook({// Config and all fields are optional
endpoint:'/location/:data/:id',//Custom path for webhook. Fields that start with a colon can be parsed using the BasicProcessor as 'rest_data' in the subscription response.
id:'my-hook',//ID of webhook. UUID is created when blank
hookProcessor: processor,//Processor that handles webhook request. Default is BasicProcessor.
hookAuthentication: atuhentication,//Webhook Authenticator. Default is NoAuthentication
subscriptionAuthentication: atuhentication,//Subscription Authenticator. Default is NoAuthentication
maxSubscriptions:10,//Max number of subscriptions for hook
bundleId:''//ID of bundle to put webhook in. Leaving blank does not put webhook in a bundle