open-notebook/docs
Luis Novo ec41ef8f2f
Some checks failed
Development Build / extract-version (push) Has been cancelled
Tests / Backend Tests (push) Has been cancelled
Tests / Frontend Tests (push) Has been cancelled
Development Build / build-regular (push) Has been cancelled
Development Build / build-single (push) Has been cancelled
Development Build / summary (push) Has been cancelled
feat(api): add configurable CORS origins via CORS_ORIGINS (#767)
Replace hardcoded `allow_origins=["*"]` with a parsed `CORS_ORIGINS`
environment variable (comma-separated). Default remains `*` for
backward compatibility — no existing deployment breaks — but the API
now logs a startup warning prompting users to set it explicitly for
production.

Exception handlers now route their CORS headers through a shared
`_cors_headers()` helper that mirrors Starlette's CORSMiddleware
behavior: reflects the request Origin when allowed (handling the
browser-rejected `*` + credentials combination correctly), and omits
`Access-Control-Allow-Origin` for disallowed origins so error bodies
don't leak cross-origin when `CORS_ORIGINS` is configured.

Closes #585, #730.

Based on the original work by Greg Grace in #597; rewritten on top of
current main to address prior review feedback (load_dotenv kept at
top, `import os` grouped with stdlib, `_cors_headers` defined before
its exception-handler callers, origins parsed once at module load)
and to choose a non-breaking default paired with a startup warning
instead of a stricter-by-default origin.

Co-authored-by: Greg Grace <ggrace@519lab.com>
2026-04-19 16:22:10 -03:00
..
0-START-HERE Remove reference to OLLAMA_NUM_GPU 2026-04-15 16:26:14 +02:00
1-INSTALLATION Make embedding batch size configurable (#742) 2026-04-19 15:37:42 -03:00
2-CORE-CONCEPTS feat(podcasts): model registry integration, credential passthrough & new features (#632) 2026-02-27 11:06:47 -03:00
3-USER-GUIDE fix: map base_url to endpoint for Azure credentials (#741) 2026-04-09 13:22:00 -03:00
4-AI-PROVIDERS chore: bump version to 1.8.2 and update changelog and provider docs 2026-04-06 10:59:47 -03:00
5-CONFIGURATION feat(api): add configurable CORS origins via CORS_ORIGINS (#767) 2026-04-19 16:22:10 -03:00
6-TROUBLESHOOTING chore: bump version to 1.8.2 and update changelog and provider docs 2026-04-06 10:59:47 -03:00
7-DEVELOPMENT docs: add security guidelines for contributors 2026-04-09 12:16:09 -03:00
assets docs: fix removed assets in https://github.com/lfnovo/open-notebook/pull/379 affecting README.md 2026-01-06 15:07:58 +01:00
index.md docs: deprecate single-container image in favor of Docker Compose 2026-04-06 08:10:32 -03:00
SECURITY_REVIEW.md feat: credential-based API key management (#477) (#540) 2026-02-10 08:30:22 -03:00