Logo
Explore Help
Sign In
go/httpmw
1
0
Fork 0
You've already forked httpmw
Code Issues Pull Requests Packages Releases 1 Activity
Files
2298846280f9f3591c854153e7f4bade7ef5fa88
httpmw/go.mod

6 lines
90 B
Modula-2
Raw Normal View History

feat(httpmw): initial stable release v0.9.0 Standalone net/http middleware for panic recovery, CORS, request ID injection, and request logging. What's included: - Recover(): panic -> 500, captures debug.Stack, no logger required - CORS(origins): OPTIONS 204 preflight, origin allowlist, package-wide method/header constants - RequestID(generator): injects ID via logz.WithRequestID, sets X-Request-ID response header - RequestLogger(logger): logs method/path/status/latency/request_id; Error for 5xx, Info otherwise - Logger interface: Info, Error, With — duck-typed; satisfied by logz.Logger - StatusRecorder: exported http.ResponseWriter wrapper that captures written status code - Direct logz import for context helpers (documented exception to ADR-001) Tested-via: todo-api POC integration Reviewed-against: docs/adr/
2026-03-19 00:03:24 +00:00
module code.nochebuena.dev/go/httpmw
go 1.25
require code.nochebuena.dev/go/logz v0.9.0
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.4 Page: 22ms Template: 1ms
English
English
Licenses API