Update common.php

This commit is contained in:
qkqpttgf 2020-03-04 17:35:36 +08:00 committed by GitHub
parent f6f0c08d4f
commit ef56219ef3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -621,7 +621,7 @@ function main($path)
if ( $_SERVER['ishidden']<4 || (!!getConfig('downloadencrypt')&&$files['name']!=getConfig('passfile')) ) {
if (getConfig('proxydownload')) {
$header = [];
if (isset($_SERVER['headers']['range'])) $header = [ 'Range' => $_SERVER['headers']['range'] ];
if (isset($_SERVER['HTTP_RANGE'])) $header = [ 'Range' => $_SERVER['HTTP_RANGE'] ];
$response = curl_request( $files['@microsoft.graph.downloadUrl'], '', $header );
return output( base64_encode($response['body']), $response['stat'], ['Content-Type' => 'application/octet-stream'], true );
} else return output('', 302, [ 'Location' => $files['@microsoft.graph.downloadUrl'] ]);