Repository navigation
Admit nemar.org's staging site for the NEMAR assistant - #461
Merged
Merged
Conversation
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.
4 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
https://test.nemar.org, nemar.org's staging site, to NEMAR'scors_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_originallows the shared platform key only for a community's listed origins, and NEMAR listed onlynemar.organdwww.nemar.org. The edge worker already admitted any*.nemar.orgorigin; its explicit list is regenerated withscripts/sync_worker_cors.pyso the sync workflow has nothing left to change.Only NEMAR is affected: the origin is authorized for NEMAR alone, and no other
nemar.orgsubdomain is added.Test plan
tests/test_api/test_authorization.py:test.nemar.orgis authorized for NEMAR, not for another community, and anothernemar.orgsubdomain 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 checkclean.bun workers/osa-worker/test-routing.jsandtest-mounted-hosts.jspass.