Skip to content

Commit 07ccc68

Browse files
committed
docs: add CORS note for web client integration
- Clarifies CORS setup for web apps - Explains default for local development
1 parent b1a2087 commit 07ccc68

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,14 @@ for more details.
7575
from `lib/src/fixtures/` will be loaded into the in-memory repositories on
7676
startup.
7777

78+
**Note on Web Client Integration (CORS):**
79+
To allow web applications (like the HT Dashboard) to connect to this API,
80+
the `CORS_ALLOWED_ORIGIN` environment variable must be set to the
81+
specific origin of your web application (e.g., `https://your-dashboard.com`).
82+
For local development, if this variable is not set, the API defaults to
83+
allowing `http://localhost:3000` and issues a console warning. See the
84+
`routes/api/v1/_middleware.dart` file for the exact implementation details.
85+
7886
## ✅ Testing
7987

8088
Ensure the API is robust and meets quality standards by running the test suite:

0 commit comments

Comments
 (0)