buildadmin/app/Request.php

27 lines
554 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
namespace app;
/**
* 应用请求对象类
*/
class Request extends \think\Request
{
/**
* 全局过滤规则
* app/common.php 的 filter 函数
*/
protected $filter = 'filter';
public function __construct()
{
parent::__construct();
// 从配置文件读取代理服务器ip并设置给 \think\Request
$proxyServerIp = config('buildadmin.proxy_server_ip');
if (is_array($proxyServerIp) && $proxyServerIp) {
$this->proxyServerIp = $proxyServerIp;
}
}
}