From e0e12ba848e32acca14779243c909f26902de6f0 Mon Sep 17 00:00:00 2001 From: "cn.yimian.xyz" Date: Thu, 19 May 2022 17:19:07 +0800 Subject: [PATCH] gcore.jsdelivr --- functions.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/functions.php b/functions.php index bed9207..69547ab 100755 --- a/functions.php +++ b/functions.php @@ -321,9 +321,13 @@ function getImgCDNProxy($path){ function getImgCDN($path){ if(stripos($path, 'moe') !== false){ preg_match_all('/img_(\S*?)_(\d{2,4})x(\d{2,4})_(\S*?)_(\S*?)_(\S*?).(jpe?g|png|gif|svg)\b/', $path, $arr); - return str_replace('moe','https://fastly.jsdelivr.net/npm/ushio-api-img-moe@5.0.'.intval($arr[1][0]/10).'',$path); - //https://testingcf.jsdelivr.net/ - //https://gcore.jsdelivr.net/ + //$d = 'https://testingcf.jsdelivr.net/'; + $d = 'https://gcore.jsdelivr.net/'; + // $d = 'https://fastly.jsdelivr.net/'; + // $d = 'https://cdn.jsdelivr.net/'; + // $d = 'https://originfastly.jsdelivr.net/'; + // $d = 'https://quantil.jsdelivr.net/'; + return str_replace('moe',$d.'npm/ushio-api-img-moe@5.0.'.intval($arr[1][0]/10).'',$path); } return getImg($path); }