Skip to content

Commit fc94661

Browse files
thymikeeclaude
andcommitted
test(revyl): record a fixture request only when it carries the API key
Every runtime request carries the key, so a request without one is another host process probing the fixture's ephemeral port. It is answered 404 and not recorded; any runtime request is recorded at any path. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent c7a089d commit fc94661

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎packages/provider-revyl/src/revyl-backend.fixtures.ts‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,10 @@ export async function startRevylFixtureBackend(
121121
const raw = Buffer.concat(chunks).toString('utf8');
122122
const url = request.url ?? '/';
123123
const method = request.method ?? 'GET';
124-
// The fixture listens on an ephemeral localhost port that any process on the host can reach, and a
125-
// bare `GET /` probe from one is not the runtime's call. Any other path is recorded, so a client
126-
// that leaves Revyl's API still shows up in the assertions.
127-
if (method === 'GET' && url === '/') {
124+
// The fixture listens on an ephemeral localhost port that any process on the host can reach. Every
125+
// runtime request carries the API key, so a request without one is another process's probe and is
126+
// not recorded; a runtime request is recorded at any path, including one outside Revyl's API.
127+
if (header(request, 'authorization') === undefined) {
128128
response.writeHead(404).end();
129129
return;
130130
}

0 commit comments

Comments
 (0)