adnanh/webhook

Webhook id is not being served in URL

kimimaru4000 opened this issue · 2 comments

System info:

  • Ubuntu 22.04.3, Linux Kernel 4.15.0-112
  • webhook version 2.8.0

I'm using a dead simple webhook like the following:

[
  {
    "id": "redeploy-personalsite",
    "execute-command": "/home/user/deploysite.sh",
    "command-working-directory": "/home/user"
  }
]

When I deploy webhooks using webhook -hooks hooks.json -verbose, it always spits out a URL like http://0.0.0.0:9000/hooks/{id}. Note how it doesn't include the ID of the webhook in the URL.

Here's the full verbose output:

[webhook] REDACTED version 2.8.0 starting
[webhook] REDACTED setting up os signal watcher
[webhook] REDACTED attempting to load hooks from hooks.json
[webhook] REDACTED found 1 hook(s) in file
[webhook] REDACTED   loaded: redeploy-personalsite
[webhook] REDACTED serving hooks on http://0.0.0.0:9000/hooks/{id}
[webhook] REDACTED os signal watcher ready

What do I need to do to get webhook to generate a proper URL? Is there something that needs to be updated in the documentation? From my first experience using webhook, this looks like a bug. Thanks in advance!

Hi kimimaru4000,

"serving hooks on http://0.0.0.0:9000/hooks/{id}" means all id's listed above as loaded.
The loaded id is "loaded: redeploy-personalsite" and should be reachable under "http://0.0.0.0:9000/hooks/redeploy-personalsite". You need to exchange 0.0.0.0, depending under your server is reachable, which Domain name or ip in you webhook call.

Br,

para-do-x

Thanks for the clarification. It's working very well now! I appreciate the help!