mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-06-28 21:31:37 +08:00
增加通过http头判断是否API请求
This commit is contained in:
parent
d292e8cead
commit
5feacf7a49
@ -30,6 +30,10 @@ class Request extends \Phalcon\Http\Request
|
|||||||
{
|
{
|
||||||
$url = $this->get('_url');
|
$url = $this->get('_url');
|
||||||
|
|
||||||
|
if ($this->hasHeader('X-Platform')) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (stripos($url, '/api') !== false) {
|
if (stripos($url, '/api') !== false) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user