update:允许后缀更新
This commit is contained in:
18
Json/download_config_CN_BACK.json
Normal file
18
Json/download_config_CN_BACK.json
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"version": "1.0.8610",
|
||||
"vol.1.data": {
|
||||
"url": "https://fly.qingyuji.cn/f/0ojS8/vol.1.7z"
|
||||
},
|
||||
"vol.2.data": {
|
||||
"url": "https://fly.qingyuji.cn/f/pQjFr/vol.2.7z"
|
||||
},
|
||||
"vol.3.data": {
|
||||
"url": "https://fly.qingyuji.cn/f/63xiG/vol.3.7z"
|
||||
},
|
||||
"vol.4.data": {
|
||||
"url": "https://fly.qingyuji.cn/f/WwRu2/vol.4.7z"
|
||||
},
|
||||
"after.data": {
|
||||
"url": "https://fly.qingyuji.cn/f/Qmrur/after.7z"
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,7 @@ $file_info = pathinfo($file);
|
||||
$file_ext = isset($file_info['extension']) ? $file_info['extension'] : '';
|
||||
|
||||
// 允许的文件后缀
|
||||
$allow_ext = ['js', 'css', 'png', 'jpg', 'jpeg', 'gif', 'ico', 'json', 'txt', 'moc', 'moc3', 'svg', 'webp', 'hosts', 'ttf', 'woff', 'woff2', 'eot', 'sgmodule'];
|
||||
$allow_ext = ['js', 'css', 'png', 'jpg', 'jpeg', 'gif', 'ico', 'json', 'txt', 'moc', 'moc3', 'svg', 'webp', 'hosts', 'ttf', 'woff', 'woff2', 'eot', 'sgmodule', 'exe'];
|
||||
|
||||
// 首页和帮助页
|
||||
if ($_SERVER['REQUEST_URI'] == '/') {
|
||||
@@ -86,7 +86,9 @@ function get_mimetype($extension) {
|
||||
'ttf' => 'font/ttf',
|
||||
'woff' => 'font/woff',
|
||||
'woff2' => 'font/woff2',
|
||||
'eot' => 'application/vnd.ms-fontobject'
|
||||
'eot' => 'application/vnd.ms-fontobject',
|
||||
'sgmodule' => 'application/octet-stream',
|
||||
'exe' => 'application/octet-stream'
|
||||
];
|
||||
return $mime_types[strtolower($extension)] ?? 'text/plain';
|
||||
}
|
||||
@@ -107,6 +109,9 @@ if (strpos($_SERVER['REQUEST_URI'], '/gh') === 0) {
|
||||
} elseif (strpos($_SERVER['REQUEST_URI'], '/unpkg') === 0) {
|
||||
$target_host = "https://unpkg.com";
|
||||
$new_request_uri = substr($_SERVER['REQUEST_URI'], 6);
|
||||
}elseif (strpos($_SERVER['REQUEST_URI'], '/github') === 0) {
|
||||
$target_host = "https://github.com";
|
||||
$new_request_uri = substr($_SERVER['REQUEST_URI'], 7);
|
||||
} else {
|
||||
header('content-type: application/json;charset=utf-8');
|
||||
http_response_code(404);
|
||||
|
||||
Reference in New Issue
Block a user