<?php

namespace App\Http\Middleware;

use Fideloper\Proxy\TrustProxies as Middleware;
use Illuminate\Http\Request;

// 关于设置信任代理有关的中间件
class TrustProxies extends Middleware
{
    /**
     * 此应用程序的受信任代理。
     *
     * @var array|string|null
     */
    protected $proxies;

    /**
     * 应用于检测代理的标头(headers)
     *
     * @var int
     */
    protected $headers = Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_HOST | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO | Request::HEADER_X_FORWARDED_AWS_ELB;
}
