Skip to content

NEMAR: approve app.nemar.org as an origin - #752

Merged
neuromechanist merged 2 commits into
developfrom
feature/issue-751-nemar-app-origin
Nov 13, 2026
Merged

neuromechanist merged 2 commits into
developfrom
feature/issue-751-nemar-app-origin

Conversation

@neuromechanist

Copy link
Copy Markdown
Member

Closes #751

A signed-in reader's nemar.org pages (dashboard, settings, upload) are served from app.nemar.org with the same widget, and the backend refused that origin: NEMAR's cors_origins listed only nemar.org, www.nemar.org and test.nemar.org.

Changes

  • https://app.nemar.org added to src/assistants/nemar/config.yaml cors_origins: authorizes chat and the search overview from that origin (NEMAR only), adds it to the CORS allow list, and to the notebook site's frame-ancestors (develop site on this merge, production at the next release).
  • workers/osa-worker/index.js: the generated origin list (scripts/sync_worker_cors.py) gains the entry, so the sync workflow has nothing to push. The worker already admitted *.nemar.org, so no worker deploy is needed.
  • CHANGELOG.

Production (app.nemar.org) gets this with the next OSA release to main.

Testing

  • test_nemar_app_host_is_authorized_for_nemar_only (authorized for nemar, not hed); notebook site embed origins include it.
  • tests/test_api/test_authorization.py, tests/test_scripts/test_build_notebook_site.py, tests/test_assistants: 581 pass.

Review (one Sonnet reviewer)

No Critical or Important findings; every consumer of cors_origins was checked (CORS setup, origin authorization, notebook frame-ancestors, worker), and nothing else keys on page origin.

Fixed:

  • The sync workflow would have pushed a bot commit regenerating the worker's origin list; the regenerated line is in this PR.
  • CHANGELOG now says the production notebook site picks the origin up at the next release, not immediately.

Rejected:

  • A staging counterpart of the app host: test.nemar.org runs in single-host mode (website AGENTS.md), so there is none.

A signed-in reader's nemar.org pages are served from app.nemar.org, where
the widget was refused. Adding it to cors_origins authorizes chat and the
overview, CORS, and the notebook site's frame-ancestors. Tests added
(581 pass in authorization, notebook site and assistants).
@neuromechanist
neuromechanist merged commit ec45370 into develop Nov 13, 2026
12 checks passed
@neuromechanist
neuromechanist deleted the feature/issue-751-nemar-app-origin branch November 13, 2026 20:29
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