Skip to content

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

Open
Lykhoyda wants to merge 2 commits intomainfrom
fix/add-api-key-header
Open

fix: add X-API-Key header to API client#2
Lykhoyda wants to merge 2 commits 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 2 times, most recently from 28b09e9 to 22afdfb Compare April 6, 2026 17:03
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 425d7b4 to d8fa19b Compare April 6, 2026 17:33
Synpress 4.1.2 internally uses playwright-core@1.48.2 which expects
chromium-1200. The workspace Playwright 1.59.1 installs a newer
Chromium. When the Synpress cache is invalidated (lockfile changed),
cache generation fails because the old Chromium isn't installed.

Fix: install both the workspace Chromium (for tests) and the
Synpress-compatible Chromium 1.48.2 (for cache generation).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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