https://github.com/djdefi/webhook-muxer
Muxer for webhooks written in Ruby (Sinatra)
https://github.com/djdefi/webhook-muxer
cicd webhooks
Last synced: 6 months ago
JSON representation
Muxer for webhooks written in Ruby (Sinatra)
- Host: GitHub
- URL: https://github.com/djdefi/webhook-muxer
- Owner: djdefi
- License: unlicense
- Created: 2021-07-17T20:58:38.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2025-11-02T05:16:16.000Z (8 months ago)
- Last Synced: 2025-11-02T07:09:52.814Z (8 months ago)
- Topics: cicd, webhooks
- Language: Ruby
- Homepage:
- Size: 137 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Webhook muxer
This is a simple proof of concept that allows you to forward incoming webhooks to any number of URLs.
# Installation
```bash
bundle install
```
# Usage
1. Create a file called `urls.txt` with one url per line.
2. Run the server:
```bash
ruby webhook-muxer.rb
```
3. Send a webhook to the server:
```bash
curl -X POST -d '{"foo": "bar"}' http://localhost:4567/
```
4. The server will forward the webhook payload to all urls in `urls.txt`.
## Async delivery
An async delivery option is also available.
```bash
curl -X POST -d '{"foo": "bar"}' http://localhost:4567/async
```
The server will return a 200 status code immediately, and then deliver the webhook payload to all urls in `urls.txt` asynchronously. Any errors in forwarding will not be reported in the response.