mirror of
https://github.com/Kpa-clawbot/meshcore-analyzer.git
synced 2026-06-05 06:01:31 +00:00
1624d6e244
## Fix: unprotect /api/decode from API key auth Fixes #304 ### Problem PR #283 applied `requireAPIKey` to all POST endpoints including `/api/decode`. But BYOP decode is a stateless read-only decoder — it never writes to the database. Users see "write endpoints disabled" when trying to decode packets. ### Fix - Removed `requireAPIKey` wrapper from `/api/decode` in `cmd/server/routes.go` - Updated auth tests to use `/api/perf/reset` (actual write endpoint) instead of `/api/decode` - Added tests proving `/api/decode` works without API key, even when apiKey is configured or empty ### Note Decoder consolidation (`internal/decoder/` shared package) is tracked separately and not included here to keep the PR clean. ### Tests - `cd cmd/server && go test ./...` ✅ Co-authored-by: Kpa-clawbot <259247574+Kpa-clawbot@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>