Skip to content

fix: add X-API-Key header to API client#2

Merged
Lykhoyda merged 1 commit intomainfrom
fix/add-api-key-header
Apr 10, 2026
Merged

fix: add X-API-Key header to API client#2
Lykhoyda merged 1 commit intomainfrom
fix/add-api-key-header

Conversation

@Lykhoyda
Copy link
Copy Markdown
Owner

@Lykhoyda Lykhoyda commented Apr 6, 2026

Summary

The testudo-api now requires X-API-Key authentication on all /api/v1/* routes. Without this header, all extension API calls return 401.

  • Read TESTUDO_API_KEY from process.env at build time (baked into extension bundle)
  • Send as X-API-Key header on all fetchWithTimeout calls
  • Added apiKey option to ApiClientOptions for per-call override
  • Added TESTUDO_API_KEY to .env.example
  • All 16 API client tests pass

Deployment notes

Set TESTUDO_API_KEY in the extension's build environment to one of the keys from the API's API_KEYS env var.

🤖 Generated with Claude Code

@Lykhoyda Lykhoyda force-pushed the fix/add-api-key-header branch 4 times, most recently from 4904366 to 2cb7f7b Compare April 10, 2026 12:43
The testudo-api now requires X-API-Key authentication on all /api/v1/*
routes. Read TESTUDO_API_KEY from env at build time and send as header.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Lykhoyda Lykhoyda force-pushed the fix/add-api-key-header branch from 2cb7f7b to 8c3ae3d Compare April 10, 2026 14:17
@Lykhoyda Lykhoyda merged commit 2e1f950 into main Apr 10, 2026
6 checks passed
@Lykhoyda Lykhoyda deleted the fix/add-api-key-header branch April 10, 2026 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant