test("ordinary image/subresource GET without intent header cannot start a probe",async()=>{
constresponse=awaitclaudeCodeInstallationResponse(newRequest("http://localhost:3000/api/claude-code"),async()=>assert.fail("must not probe"));
assert.equal(response.status,403);
});
for(constheadersof[{},{origin:"http://localhost:3000","sec-fetch-site":"same-origin"}]asRecord<string,string>[])test(`legitimate Providers GET ${JSON.stringify(headers)} is supported`,async()=>{
test("a forged forwarded origin cannot authorize a foreign Origin header",async()=>{
constresponse=awaitclaudeCodeInstallationResponse(request({origin:"https://attacker.invalid","x-forwarded-host":"attacker.invalid","x-forwarded-proto":"https"}),async()=>assert.fail("must not probe"));