1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-06-28 13:21:37 +08:00

增加通过http头判断是否API请求

This commit is contained in:
xiaochong0302 2021-01-10 11:46:08 +08:00
parent d292e8cead
commit 5feacf7a49

View File

@ -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;
}