root/LayoutTests/http/tests/security/resources/captions-with-access-control-headers.php

/* [<][>][^][v][top][bottom][index][help] */
<?php

    $origin = $_GET["origin"];
    $credentials = $_GET["credentials"];

    if ($origin)
        header("Access-Control-Allow-Origin: http://127.0.0.1:8000");
    if ($credentials)
        header("Access-Control-Allow-Credentials: true");
    
    $name = 'captions.vtt';
    $fp = fopen($name, 'rb');
    header("Content-Type: text/vtt");
    header("Content-Length: " . filesize($name));
    
    fpassthru($fp);
    exit;
?>

/* [<][>][^][v][top][bottom][index][help] */