2022-02-20 22:42:48 +00:00
|
|
|
|
<?php
|
2022-08-23 15:01:30 +00:00
|
|
|
|
|
2022-02-20 22:42:48 +00:00
|
|
|
|
namespace app;
|
|
|
|
|
|
2024-11-03 11:05:22 +00:00
|
|
|
|
/**
|
|
|
|
|
* 应用请求对象类
|
|
|
|
|
*/
|
2022-02-20 22:42:48 +00:00
|
|
|
|
class Request extends \think\Request
|
|
|
|
|
{
|
2024-11-03 11:09:42 +00:00
|
|
|
|
/**
|
|
|
|
|
* 全局过滤规则
|
|
|
|
|
* app/common.php 的 filter 函数
|
|
|
|
|
*/
|
|
|
|
|
protected $filter = 'filter';
|
|
|
|
|
|
2024-11-03 11:05:22 +00:00
|
|
|
|
public function __construct()
|
|
|
|
|
{
|
|
|
|
|
parent::__construct();
|
2022-02-20 22:42:48 +00:00
|
|
|
|
|
2024-11-03 11:05:22 +00:00
|
|
|
|
// 从配置文件读取代理服务器ip,并设置给 \think\Request
|
|
|
|
|
$proxyServerIp = config('buildadmin.proxy_server_ip');
|
|
|
|
|
if (is_array($proxyServerIp) && $proxyServerIp) {
|
|
|
|
|
$this->proxyServerIp = $proxyServerIp;
|
|
|
|
|
}
|
|
|
|
|
}
|
2022-02-20 22:42:48 +00:00
|
|
|
|
}
|