Commit Graph
21 Commits
Author SHA1 Message Date
Andy Dixon 680bfac014 Send as webhook.me.uk, add favicon, share image and SEO tags
Mail now comes from no-reply@webhook.me.uk (DKIM, SPF and DMARC are
set up for it) and the Message-ID uses that domain instead of the
container hostname. The landing page gets a favicon, an Open Graph
image, canonical/OG/Twitter/JSON-LD tags, robots.txt that keeps
crawlers off email URLs, and a sitemap. Footer links to dixon.cx.
2026-09-22 08:50:20 +01:00
Andy Dixon 07701ba9cd Clean white theme in black and Bristol blue, move to webhook.me.uk
The landing page and the email shell drop the dark gradient look for a
white background, black text and a single Bristol blue accent. Copy is
unchanged. Email footers and docs now point at webhook.me.uk; the
dixon.cx hostnames keep working.
2026-09-22 08:41:01 +01:00
Andy Dixon 2d0f98e041 Rewrite the service in Go and ship it as a static container
The PHP app, Apache, and .htaccess are replaced by a single Go binary
(standard library only). Routing, the JSON response, the landing page,
the shared email design, and all four parsers are ported with the same
output; JSON object keys are kept in sender order via an ordered decoder.

- mail.go: SMTP delivery with quoted-printable body and RFC 2047 subject
- main.go: routing, client IP from the proxy, /healthz, -check flag
- render.go: email shell, escaping, table helpers, generic renderer
- parser_*.go: github, grafana, json, wxinteract
- main_test.go: handler, response shape, IP forwarding, every parser
- Dockerfile: multi-stage build to distroless static, non-root, HEALTHCHECK
- deploy/webhooks.dixon.cx.service: systemd unit for the container
- README and PARSER_PROMPT updated for Go; IMPLEMENTATION_SUMMARY removed
2026-09-12 19:59:54 +01:00
Andy Dixon a61da1f6e3 Move the parser guide into the repo and bring it up to date
The guide lived one directory above the repo, so the README links were
broken on GitHub. It also described the old layout: parsers inside
index.php, a copied <style> block, and div-based tables. It now covers
parsers/{name}.php, emailShell(), esc(), real table markup,
case-insensitive headers, and local testing with a sendmail override.
2026-09-12 19:48:53 +01:00
Andy Dixon 5e731d5d11 Report the client IP nginx forwards, not the Docker bridge
REMOTE_ADDR inside the container is 172.17.0.1. When the peer is a
private or loopback address, use X-Real-IP (or the first hop of
X-Forwarded-For) that nginx sets. Public peers cannot spoof it.
2026-09-12 19:21:13 +01:00
Andy Dixon 39ea06c3ee Update README for JSON response, all four parsers, and email redesign 2026-09-12 19:20:14 +01:00
Andy Dixon 64c51d4f2b Keep line breaks in values, handle scalar and string-array JSON
- esc() helper escapes free-text values and converts newlines to <br>;
  used for commit messages, SMS text, annotations, and all JSON values
- JSON parser accepts scalar bodies (string, number, bool, null) and
  renders them as a one-row table instead of falling back to the
  default template
- Arrays of plain values render as one table under their path
  breadcrumb, so nested string lists are no longer anonymous
- GitHub commits render as cards with a sha pill linked to the commit
2026-09-12 18:55:21 +01:00
Andy Dixon b3da9fbb25 Render email metadata as real tables and redesign the shell
Metadata blocks were divs styled with display:table. Nested blocks and
orphan cells created phantom columns that squeezed the value column to
a character or two. Every metadata block is now a real <table>/<tr>/<td>,
which mail clients lay out reliably, and the value column always fills
the remaining width.

The shared shell gets a gradient hero header, timestamp pill, dark
frame, and refreshed section, card, and code-block styling.
2026-09-12 18:47:20 +01:00
Andy Dixon ae9348c0ad Match GitHub event headers case-insensitively
Header names arrive lowercase over HTTP/2 (the nginx front end enables
it) and Apache preserves that case, so the X-GitHub-Event lookup missed
and every email reported "Unknown". Normalise header keys once.
2026-09-12 18:41:32 +01:00
Andy Dixon c1ec1adf85 Redesign landing page, JSON caller response, shared email shell
- docs.htm: dark single-page redesign in plain CSS, live URL builder,
  all four parsers documented, Bootstrap CDN dependency dropped
- index.php: respond with pretty-printed JSON (success and 400 error);
  email "Parsed Variables" block uses JSON instead of print_r
- parsers/helpers.php: emailShell() provides one stylesheet, header and
  footer for every email template; five duplicated stylesheets removed
2026-09-11 18:23:25 +01:00
Andy Dixon f3f58dbf95 Set webhook email sender identity 2026-09-11 18:10:16 +01:00
Andy Dixon 3d88ae2132 Added JSON parsing 2026-01-26 13:12:15 +00:00
Andy Dixon ae3e3f8488 Break parsers into subfolder 2026-01-22 17:18:35 +00:00
Andy Dixon ee65789675 Add implementation summary documentation 2026-01-22 16:59:30 +00:00
Andy Dixon 2a45e6430c Add comprehensive Webex Interact parser guide
- Detailed documentation for all 7 event types
- Configuration instructions
- Testing examples with cURL
- Email organization tips
- Troubleshooting section
- Links to official API documentation
2026-01-22 16:58:40 +00:00
Andy Dixon 1d336e4cac Add Webex Interact webhook parser
- Added wxinteractParse() function supporting all SMS API events:
  * Outbound SMS (submitted, delivered, failed)
  * Shortlink clicked
  * Inbound SMS received
  * SMS opt out
  * Contacts callback
- Helper functions for each event type with formatted HTML
- Test samples file for all event types
- Updated README with Webex Interact documentation
- Follows existing parser style and security guidelines
2026-01-22 16:57:55 +00:00
Andy Dixon 861c9dddde Additional Parsers, improve design of email 2026-01-22 16:24:19 +00:00
Andy Dixon 53889663dd Merge branch 'master' of github.com:andydixon/webhook 2025-11-10 15:38:29 +00:00
Andy Dixon 77f77af77d Added htaccess 2025-11-10 15:37:42 +00:00
Andy Dixon e56a2b340b Add GNU GPL v3 License
Added the GNU General Public License version 3 to the project.
2025-11-10 15:36:22 +00:00
Andy Dixon 80a89306a3 first commit 2025-11-10 15:35:40 +00:00