#244 修复已知bug

This commit is contained in:
Anyon 2020-09-04 12:54:38 +08:00
parent e7ea27bb7e
commit f28abaccb9
2 changed files with 9 additions and 4 deletions

View File

@ -26,10 +26,15 @@ use library\Controller;
class Update extends Controller class Update extends Controller
{ {
/** /**
* 基础URL地址 * 访问权限
* @var string
*/ */
protected $baseUri = 'https://demo.thinkadmin.top'; protected function initialize()
{
$domain = $this->app->request->host(true);
$isDemo = is_numeric(stripos($domain, 'thinkadmin.top'));
$isLocal = in_array($domain, ['127.0.0.1', 'localhost']);
if (!$isLocal && !$isDemo) $this->error('只允许访问本地或官方代码!');
}
/** /**
* 获取文件列表 * 获取文件列表

View File

@ -19,7 +19,7 @@
"endroid/qr-code": "^1.9", "endroid/qr-code": "^1.9",
"topthink/framework": "5.1.*", "topthink/framework": "5.1.*",
"zoujingli/ip2region": "^1.0", "zoujingli/ip2region": "^1.0",
"zoujingli/think-library": "5.1.*-dev", "zoujingli/think-library": "5.1.x-dev",
"zoujingli/weopen-developer": "dev-master" "zoujingli/weopen-developer": "dev-master"
}, },
"repositories": { "repositories": {