diff --git a/CHANGELOG.md b/CHANGELOG.md index 5690757b5e661da20207f1feb7b57249ddfc9041..d5ac9d27ddef4bf130feb4a2bf23c603310dab21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ### 优化 - oauth中state参数为安全base64加解码 +- 判断是否api请求逻辑 - findById参数类型不对时抛出异常 - task表增加索引加快数据查找 - markdown内容解析改由后端完成 diff --git a/README.md b/README.md index 3e0f415ac7c0af005636d6299f01436aa4718c7b..29951f81ae4d37ca5a164c913b93bff956a64e2c 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,8 @@ 酷瓜云课堂,依托腾讯云基础服务架构,采用C扩展框架Phalcon开发,GPL-2.0开源协议,致力开源网课系统,开源网校系统,开源在线教育系统。 ![](https://img.shields.io/static/v1?label=release&message=1.2.4&color=blue) -![](https://img.shields.io/static/v1?label=stars&message=168&color=blue) -![](https://img.shields.io/static/v1?label=forks&message=63&color=blue) +![](https://img.shields.io/static/v1?label=stars&message=170&color=blue) +![](https://img.shields.io/static/v1?label=forks&message=66&color=blue) ![](https://img.shields.io/static/v1?label=license&message=GPL-2.0&color=blue) ### 系统功能 diff --git a/app/Library/Http/Request.php b/app/Library/Http/Request.php index d88e43ef2536c8a957219b2e4548e5bdbb9004cc..04a1aeed6e900067f1ef740831ad8a68e3126900 100644 --- a/app/Library/Http/Request.php +++ b/app/Library/Http/Request.php @@ -30,6 +30,10 @@ class Request extends \Phalcon\Http\Request { $url = $this->get('_url'); + if ($this->hasHeader('X-Platform')) { + return true; + } + if (stripos($url, '/api') !== false) { return true; }