Skip to content

refactor(ingest): replace CORS_ORIGINS config with origin reflecting#5

Merged
johannmachemer merged 1 commit intomainfrom
refactor/remove-cors-origins-config
Feb 26, 2026
Merged

refactor(ingest): replace CORS_ORIGINS config with origin reflecting#5
johannmachemer merged 1 commit intomainfrom
refactor/remove-cors-origins-config

Conversation

@johannmachemer
Copy link
Contributor

@johannmachemer johannmachemer commented Feb 26, 2026

Summary

  • Remove the CORS_ORIGINS env var and configurable allowlist from the ingest API
  • Switch to origin: true + credentials: true (reflects all origins)
  • Auth is enforced via API keys and JWTs, not origin restrictions, so the allowlist added complexity without security benefit

Changes

  • Ingest: Remove corsOrigins from config, types, app options, and CORS plugin
  • Test: Add access-control-allow-credentials assertion
  • Config/docs: Remove CORS_ORIGINS from .env.example, docker-compose.yml, turbo.json, self-hosting docs, error catalog, and SDK specs

Test plan

  • Existing CORS tests pass with new credentials: true assertion
  • Ingest server starts without CORS_ORIGINS env var
  • Widget requests with Origin header receive correct reflected CORS headers

…reflecting

Auth is enforced via API keys and JWTs, not origin restrictions, so a
configurable CORS allowlist adds complexity without security benefit.
The ingest API now reflects all origins with credentials support.
@johannmachemer johannmachemer merged commit 4993f8a into main Feb 26, 2026
11 checks passed
@johannmachemer johannmachemer deleted the refactor/remove-cors-origins-config branch February 26, 2026 20:17
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