Skip to content

chore(fixtures): scrub internal hosts and drop artifact CORS header from cassettes - #117

Merged
Fivell merged 2 commits into
masterfrom
chore/fixture-placeholder-hosts
Jun 14, 2026
Merged

chore(fixtures): scrub internal hosts and drop artifact CORS header from cassettes#117
Fivell merged 2 commits into
masterfrom
chore/fixture-placeholder-hosts

Conversation

@Fivell

@Fivell Fivell commented Jun 12, 2026

Copy link
Copy Markdown
Member

Cleans up two issues in cassettes recorded from live traffic. Two commits:

1. Scrub non-public hosts

  • a real customer webhook host in the dids.yml callback_url response body — replaced with the RFC 2606 example.com placeholder

2. Drop Access-Control-Allow-Origin entirely (all 69 occurrences, 19 files)
The SDK sends no Origin header, and the live API only reflects an Origin back when one is present — with no Origin it returns no Access-Control-Allow-Origin at all.

@Fivell
Fivell force-pushed the chore/fixture-placeholder-hosts branch from d00c6c6 to 01b3e61 Compare June 14, 2026 08:57
Cassettes recorded from live traffic kept two non-public hosts:

- a real customer webhook host in the dids.yml callback_url response
  body — replaced with the RFC 2606 example.com placeholder;
- an internal documentation host echoed back in Access-Control-Allow-Origin
  response headers (areas.yml, orders.yml,
  voice_out_trunk_regenerate_credentials.yml) — normalized to '*' for
  consistency with the 65 other fixtures.

The server reflects the request Origin into this header (and omits it
entirely when no Origin is sent, as the SDK does), so the recorded value
is an artifact of capture rather than a meaningful API response. The
header is response-only and is never used for request matching (see
tests/bootstrap.php), so replay is unaffected.
@Fivell
Fivell force-pushed the chore/fixture-placeholder-hosts branch from 01b3e61 to 9332486 Compare June 14, 2026 09:18
…ttes

The SDK sends no Origin header, so the live API returns no
Access-Control-Allow-Origin in response (it only reflects an Origin back
when one is sent). The recorded values were therefore artifacts of how
the cassettes were captured — one even leaking an internal host. Removing
the header makes the cassettes faithful to real SDK traffic and matches
the other SDKs, whose fixtures carry no CORS headers at all.

Response-header only, never used for request matching (tests/bootstrap.php),
so replay is unaffected; 253 tests pass.
@sonarqubecloud

Copy link
Copy Markdown

@Fivell Fivell changed the title chore(fixtures): use example.com placeholders for internal hosts chore(fixtures): scrub internal hosts and drop artifact CORS header from cassettes Jun 14, 2026
@Fivell
Fivell merged commit eaad6c1 into master Jun 14, 2026
6 checks passed
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