mailship/test
Agent fdc4579aa7 fix: scope CORS to browser routes only, require CORS_ORIGIN (fail closed)
The server was setting Access-Control-Allow-Origin: * on every route,
including the unauthenticated GET /subscription/email which returns the
subscriber's email address. Any website could query known pubkeys and
harvest emails.

Changes:
- src/env.ts: require CORS_ORIGIN env var (fail closed, no wildcard)
- src/server.ts: scope CORS middleware to browser-facing routes only,
  skip /notify (server-to-server), add Vary: Origin header, import
  CORS_ORIGIN from env instead of defaulting to '*'
- .env.template: document new CORS_ORIGIN variable
- test/cors.test.sh: verify CORS on browser routes, no CORS on
  server-to-server routes, Vary: Origin presence
2026-09-10 11:29:18 -04:00
..
cors.test.sh fix: scope CORS to browser routes only, require CORS_ORIGIN (fail closed) 2026-09-10 11:29:18 -04:00
integration.sh Make subscription upsert idempotent via PUT 2026-09-03 11:47:21 -04:00
normalize-relay-url.test.js test: add failing test for normalizeRelayUrl(undefined) crash 2026-08-25 09:29:29 -04:00
web-ui.test.js fix: guard normalizeRelayUrl against undefined env var 2026-08-24 18:21:00 -04:00