今天重新部署了一下环境和代码,报错····错误代码如下:
Argument 2 passed to Symfony\Component\HttpFoundation\Request::setTrustedProxies() must be of the type integer, array given,
后来百度了一下找到了解决办法:
找到文件app\Http\Middleware\
找到
protected $headers = [
Request::HEADER_FORWARDED => 'FORWARDED',
Request::HEADER_X_FORWARDED_FOR => 'X_FORWARDED_FOR',
Request::HEADER_X_FORWARDED_HOST => 'X_FORWARDED_HOST',
Request::HEADER_X_FORWARDED_PORT => 'X_FORWARDED_PORT',
Request::HEADER_X_FORWARDED_PROTO => 'X_FORWARDED_PROTO',
];
修改为:
protected $headers = Request::HEADER_X_FORWARDED_ALL;
保存好了!
具体问题原因先留白,之后补充!