Make the API token fully optional #5

Merged
matitos merged 1 commits from fix/optional-api-token into main 2026-09-19 16:35:37 +02:00
Owner

Removes the deploy hard-fail on CRYPTO_API_TOKEN; the app works with no token at all. When set, it still protects /api and /api/ws (nginx injects it server-side). Adds tests for the tokenless API and WebSocket.

Backend: 81 tests pass, ruff clean. Frontend: build + tests pass.

Removes the deploy hard-fail on `CRYPTO_API_TOKEN`; the app works with no token at all. When set, it still protects `/api` and `/api/ws` (nginx injects it server-side). Adds tests for the tokenless API and WebSocket. Backend: 81 tests pass, ruff clean. Frontend: build + tests pass.
matitos added 1 commit 2026-09-19 16:32:09 +02:00
Make the API token fully optional
CI/CD / backend (pull_request) Successful in 5m36s
CI/CD / frontend (pull_request) Successful in 5m12s
CI/CD / build (pull_request) Skipped
CI/CD / deploy (pull_request) Skipped
CI/CD / cleanup (pull_request) Skipped
2a88f55689
The deploy job hard-failed without CRYPTO_API_TOKEN, and /api/ws (which skips
Basic auth) relied on that token. Drop the requirement: the app now works with
no token at all, matching the backend guard that was always a no-op when unset.
When a token is configured it still protects /api and /api/ws; when it is not,
/api/ws is as open as the rest of the API, which the Traefik Basic auth still
guards for everything else. Adds tests for the tokenless API and WebSocket.
matitos merged commit d80e7b155e into main 2026-09-19 16:35:37 +02:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: matitos/crypto_trading#5