mirror of
https://github.com/lfnovo/open-notebook.git
synced 2026-12-05 14:04:08 +00:00
* feat(api): allow only localhost CORS origins when no password is set Without OPEN_NOTEBOOK_PASSWORD the API has no authentication, and the default CORS wildcard let any web page the user visits call it through their browser and read the answers. While CORS_ORIGINS is unset and no password is set, the default now admits only localhost, 127.0.0.1 and [::1] origins. With a password the default stays '*', and an explicit CORS_ORIGINS always wins. The shipped UI goes through its own origin and is unaffected. Recorded in ADR-014. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(api): allow same-host CORS origins when no password is set The localhost-only default broke the default UI opened from another machine: with API_URL unset, /config points the browser at <host>:5055 from the page on port 8502, which is cross-origin. Without a password, the default now also admits origins whose host name equals the request's Host, so LAN and VPS installs keep working while other sites still can't read the API's answers. Also treats a blank CORS_ORIGINS as unset, adds positive preflight and same-host tests, names OPEN_NOTEBOOK_PASSWORD_FILE in the docs, and states that CORS is not authentication. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JFiTN3BrhD1rr799jJfi5S * docs(cors): state same-host and DNS-rebinding limits of the no-password default Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JFiTN3BrhD1rr799jJfi5S * docs(cors): say an explicit CORS_ORIGINS replaces the default Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JFiTN3BrhD1rr799jJfi5S --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| ai | ||
| database | ||
| domain | ||
| graphs | ||
| podcasts | ||
| utils | ||
| __init__.py | ||
| AGENTS.md | ||
| CLAUDE.md | ||
| config.py | ||
| exceptions.py | ||