Giter Site home page Giter Site logo

un / webhook-proxy Goto Github PK

View Code? Open in Web Editor NEW
27.0 1.0 5.0 1.75 MB

A simple tool for working with webhooks. Supports forwarding messages to one or multiple destinations, and replaying messages

Home Page: https://UnWebhook.com

License: Other

Vue 40.11% TypeScript 58.79% CSS 1.10%
testing-tools webhook webhook-server webhook-service

webhook-proxy's Introduction

Github Stars

Commits-per-month

UnWebhook Logo

UnWebhook

A simple tool for working with webhooks

To our Website & App »

By the Un team, building UnInbox

UnInbox Twitter - UnInbox Discord Server


Screenshot of UnWebhook

About

A simple tool for working with webhooks. Great for teams and staging environments.

Watch the introduction video on youtube

Capabilities

  • add multiple endpoints
  • save received messages (for 7 days)
  • automatically forward incoming messages to one or more destinations
  • choose forwarding strategy (send to: first in list, all in list)
  • support fallback forwarding (if first is down, forward to next)
  • replay webhook delivery (resend the data to destinations)

Want to send messages to your local machine and need a tunnel? Check out untun by the UnJs team


Tech Stack

UnWebhook is built with the following epic technologies & tools:

Running Locally

To get a local copy up and running, follow these simple steps.

Prerequisites

Here is what you need to be able to run UnInbox locally.

Setup

  1. Clone the repo into a public GitHub repository (or fork https://github.com/un/webhook-proxy/fork). If you plan to distribute the code, keep the source code public to comply with AGPLv3. To clone in a private repository, contact us to acquire a commercial license

    git clone https://github.com/un/webhook-proxy.git UnWebhook

    If you are on Windows, run the following command on gitbash with admin privileges:
    > git clone -c core.symlinks=true https://github.com/un/webhook-proxy.git
    See docs for more details.

  2. Go to the project folder

    cd UnWebhook
  3. Check and install the correct node/pnpm versions

    nvm install
  4. Install packages with pnpm

    pnpm i
  5. Set up your .env file

    • Duplicate .env.example to .env. This file is already pre-configured for use with the local docker containers

      mac

       cp .env.example .env

      windows

       copy .env.example .env
  6. Set your env variables

  7. Sync the schema with the database:

    pnpm run db:push
  8. Start the app and all services

    pnpm run dev

Self Hosting

Self hosting is encouraged, deploy to Vercel with Supabase as the DB

If you deploy to Supabase, enable the pg_cron extension to automatically delete messages after 7 days:

  1. Click Database in the sidebar > Extensions > search for and enable pg_cron
  2. Go to SQL editor, paste and run the following sql statements
select cron.schedule (
    'cleanup-messages',
    '30 3 * * 6',
    $$ delete from messages where created_at < now() - interval '1 week' $$
);
select cron.schedule (
    'cleanup-deliveries',
    '30 3 * * 6',
    $$ delete from message_deliveries where created_at < now() - interval '1 week' $$
);

webhook-proxy's People

Contributors

blankparticle avatar eltimuro avatar mcnaveen avatar mcpizza0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

webhook-proxy's Issues

Clarification on License Needed

We are very intrigued by and interested in both using and potentially contributing to this project. However,
after reviewing the repository as well as Issue #1 it remains unclear which license applies to this repository.
Could you please clarify which license applies?

Screenshot 2024-04-10 at 15 29 08 Screenshot 2024-04-10 at 15 29 50 Screenshot 2024-04-10 at 15 29 58

save full inbound webhook path for forwarding

currently:
when a webhook comes into an endpoint, we dont save the remainder of the path after the endpoint id

this could be useful info to use when forwarding

ideal
if an call comes in to webhookid/path1/path2
we should save path1/path2 into the webhook message
when we forward to the message to destinations
we should append the path to the end of the destination url
e.g. destination https://mytunnel.com/webhooks would become https://mytunnel.com/webhooks/path1/path2

Stripe webhook body malformed

When running the proxy locally, the stripe body payload is correctly stored and forwarded to destinations
when running on vercel, the body is somehow not sent through correctly and stripe webhook verification fails

Switch License to MIT

Since this is non-commercial, switchting this to MIT license would have several advantages:

  • Less friction for users
  • No risk of license issue if this is integrated in something else
  • Easy terms to contribute and fork

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.