修改TrustProxies 中间件,同时也要nginx支持 protected $proxies = '*'; protected $headers = Request::HEADER_X_FORWARDED_ALL;