@@ -251,14 +251,15 @@ describe("resolveVideoExtractionPolicy", () => {
251251} ) ;
252252
253253describe ( "safeVideoExtractionSourceLogMetadata" , ( ) => {
254- it ( "logs only a query-free fingerprint and allowlisted host for a signed remote source" , ( ) => {
255- const source = "https://MEDIA.HEYGEN.AI/private/clip.mp4?X-Amz-Signature=super-secret#fragment" ;
254+ it ( "logs only a query-free fingerprint and normalized host for a signed remote source" , ( ) => {
255+ const source =
256+ "https://MEDIA.CUSTOMER-CDN.EXAMPLE/private/clip.mp4?X-Amz-Signature=super-secret#fragment" ;
256257 const metadata = safeVideoExtractionSourceLogMetadata ( source ) ;
257258
258259 expect ( metadata ) . toMatchObject ( {
259260 sourceType : "remote" ,
260261 sourceFingerprint : expect . stringMatching ( / ^ s h a 2 5 6 : [ 0 - 9 a - f ] { 64 } $ / ) ,
261- host : "media.heygen.ai " ,
262+ host : "media.customer-cdn.example " ,
262263 } ) ;
263264 expect ( JSON . stringify ( metadata ) ) . not . toContain ( "super-secret" ) ;
264265 expect ( JSON . stringify ( metadata ) ) . not . toContain ( "/private/clip.mp4" ) ;
@@ -348,11 +349,11 @@ describe("assertVideoExtractionSucceeded", () => {
348349 retryable : true ,
349350 group : {
350351 sourceFingerprint : `sha256:${ index . toString ( 16 ) . padStart ( 64 , "0" ) } ` ,
351- host : index % 2 === 0 ? "media.heygen.ai " : "other" ,
352+ host : index % 2 === 0 ? "media.customer-cdn.example " : "other" ,
352353 statusClass : "http_5xx" ,
353354 retry : { phase : "download" , used : 1 , budget : 1 } ,
354355 } ,
355- error : `https://media.heygen.ai /private/${ index } .mp4?signature=secret` ,
356+ error : `https://media.customer-cdn.example /private/${ index } .mp4?signature=secret` ,
356357 } ) ) ;
357358 errors . push (
358359 {
0 commit comments