# 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: JSON webhook with email notifications [[route]] name = "email-webhook" contentType = "json" hcaptchaProtected = false requireToken = false [route.email] enabled = true to = "admin@example.com" from = "webhook@example.com" host = "smtp.example.com" port = 587 secure = true username = "webhook@example.com" password = "your-smtp-password" subject = "New Webhook Received" includeBody = true includeHeaders = false # 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)