From 3ebd241aa3656a08f78b363991120c02c615bb09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=81=E7=81=AB=E8=A1=8C=E8=80=85?= Date: Tue, 12 Oct 2021 10:52:38 +0800 Subject: [PATCH] =?UTF-8?q?cos=20=E5=8C=B9=E9=85=8D=E8=A7=84=E5=88=99?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Common/Utils.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Common/Utils.php b/src/Common/Utils.php index 838e83a..a9e04d2 100644 --- a/src/Common/Utils.php +++ b/src/Common/Utils.php @@ -350,7 +350,7 @@ class Utils $host = $parseUrl['host']; $path = $parseUrl['path']; $domain = Request::capture()->getHost(); - if (!(self::endWith($host, 'myqcloud.com') || self::endWith($host, $domain)) || !strstr($path, 'public/attachments')) { + if (!(preg_match('/^https?.+cos.+myqcloud\.com$/', $url) || self::endWith($host, $domain)) || !strstr($path, 'public/attachments')) { return false; } return true; -- Gitee