
Webhook Design for Go APIs That Customers Can Trust
Design webhooks customers can trust in Go: an event envelope, per-endpoint API versions, filters, secret rotation, auto-disable, replay and signing.
Servers, handlers, middleware, templates, cookies and sessions on net/http, plus the parts of a real website the tutorials leave out.

Design webhooks customers can trust in Go: an event envelope, per-endpoint API versions, filters, secret rotation, auto-disable, replay and signing.

Build a link preview service in Go that fetches a URL and reads its Open Graph tags, with a dialer that blocks private addresses after DNS to stop SSRF.

Pick between 301, 302, 303, 307 and 308 in Go with http.Redirect, see which keep the method and body, and avoid open redirects from a query value.

Reproduce the errors Go HTTP servers and clients print, from address already in use to HTTP response to HTTPS client, and see what each message means.

Add retries to a Go HTTP client as a RoundTripper with exponential backoff and jitter, Retry-After, body replay and a rule for which requests are safe.

Stream templ pages with templ.Flush and WithStreaming so the shell reaches the browser before slow data is ready, and see what a failed streamed render does.

Organize routes in a growing Go web app with a small Group helper on top of ServeMux, one routes method per feature, shared middleware and a route table test.

Build a reverse proxy in Go with httputil.ReverseProxy: Rewrite instead of Director, forwarded headers, error handling, streaming and path based routing.

Generate sitemaps in Go for a dynamic site: encode URLs correctly, write honest lastmod dates, split at 50,000 URLs with an index and gzip the output.

Build an in-memory response cache for Go handlers with keys, a TTL, Vary awareness, a singleflight stampede guard and rules for what must never be cached.

Build an accessible templ form in Go with errors beside each field, kept values, a redirect after success and CSRF protection from Go 1.25.

Twelve mistakes in Go HTTP servers that pass code review and fail under load or attack, each with the symptom, a reproduction where one fits, and the fix.
We send one email when a new article is published. No spam.