diff options
| author | Elizabeth Hunt <me@liz.coffee> | 2025-12-15 00:58:43 -0800 |
|---|---|---|
| committer | Elizabeth Hunt <me@liz.coffee> | 2025-12-15 00:58:43 -0800 |
| commit | 2e41f030f02a336c2e9866d3d56b0494da5a622e (patch) | |
| tree | 226d7fe0f2e0d5af847c31d97c1ab9664d1b7e33 /routes.toml.example | |
| parent | 9c9f35734e795e3c2cea21384349b655d7ffa164 (diff) | |
| download | posthook-2e41f030f02a336c2e9866d3d56b0494da5a622e.tar.gz posthook-2e41f030f02a336c2e9866d3d56b0494da5a622e.zip | |
Remove admin route in favor of a simpler toml format
Diffstat (limited to 'routes.toml.example')
| -rw-r--r-- | routes.toml.example | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/routes.toml.example b/routes.toml.example new file mode 100644 index 0000000..ac9a493 --- /dev/null +++ b/routes.toml.example @@ -0,0 +1,47 @@ +# Posthook Routes Configuration +# +# This file defines webhook routes that Posthook will handle. +# Edit this file and Posthook will automatically reload the configuration. +# +# Each [[route]] section defines a webhook endpoint available at /hook/{name} + +# Example: Simple JSON webhook +[[route]] +name = "github-webhook" +contentType = "json" +hcaptchaProtected = false +requireToken = false + +# Example: Form-encoded webhook with hCaptcha protection +[[route]] +name = "contact-form" +contentType = "form" +hcaptchaProtected = true +hcaptchaSecret = "0x0000000000000000000000000000000000000000" +requireToken = false + +# Example: JSON webhook with ntfy notifications +[[route]] +name = "alerts" +contentType = "json" +hcaptchaProtected = false +requireToken = false + +[route.ntfy] +enabled = true +server = "https://ntfy.sh" +topic = "my-alerts" + +# Example: Multipart file upload with token protection +[[route]] +name = "file-upload" +contentType = "multipart" +hcaptchaProtected = false +requireToken = true + +# Content Types: +# - json: application/json +# - form: application/x-www-form-urlencoded +# - multipart: multipart/form-data +# - text: text/plain +# - raw: any content type (stored as-is) |
