Skip to content

Admit nemar.org's staging site for the NEMAR assistant - #461

Merged
neuromechanist merged 2 commits into
developfrom
feature/nemar-staging-origin
Sep 23, 2026
Merged

neuromechanist merged 2 commits into
developfrom
feature/nemar-staging-origin

Conversation

@neuromechanist

Copy link
Copy Markdown
Member

Summary

Adds https://test.nemar.org, nemar.org's staging site, to NEMAR's cors_origins, so the widget can be tested there against the dev worker before an OSA release is pinned on nemar.org.

Without it, every chat from staging is refused with a 403 "API key required": _is_authorized_origin allows the shared platform key only for a community's listed origins, and NEMAR listed only nemar.org and www.nemar.org. The edge worker already admitted any *.nemar.org origin; its explicit list is regenerated with scripts/sync_worker_cors.py so the sync workflow has nothing left to change.

Only NEMAR is affected: the origin is authorized for NEMAR alone, and no other nemar.org subdomain is added.

Test plan

  • A new test in tests/test_api/test_authorization.py: test.nemar.org is authorized for NEMAR, not for another community, and another nemar.org subdomain is not. It fails with the origin removed from the config.
  • uv run pytest -m "not network" tests/test_api tests/test_assistants tests/test_core: 1319 passed. ruff check clean.
  • bun workers/osa-worker/test-routing.js and test-mounted-hosts.js pass.

test.nemar.org embeds the widget against the dev worker before a release pins it on nemar.org. Without it in NEMAR's cors_origins, every chat from staging is refused with 403 (no platform key for an unlisted origin). The worker's origin list is regenerated by scripts/sync_worker_cors.py. Tested: the new authorization test, failing with the origin removed; the API, assistant and config suites; the worker's routing tests.
@neuromechanist
neuromechanist merged commit 66e326a into develop Sep 23, 2026
8 checks passed
@neuromechanist
neuromechanist deleted the feature/nemar-staging-origin branch September 23, 2026 21:44
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