我今天已从L5.5升级到L5.6(在此过程中将Symfony组件更新为v4).此外,我fideloper/proxy还将官方Laravel 5.6升级指南更新到4.0.
之后我开始收到此错误: Type error: Argument 2 passed to Symfony\Component\HttpFoundation\Request::setTrustedProxies() must be of the type integer, array given, called in /var/www/html/vendor/fideloper/proxy/src/TrustProxies.php on line 54
Symfony 4 Symfony\Component\HttpFoundation\Request::setTrustedProxies()确实期望整数(位掩码)作为第二个参数:
/**
* Sets a list of trusted proxies.
*
* You should only list the reverse proxies that you manage directly.
*
* @param array $proxies A list of trusted proxies
* @param int $trustedHeaderSet A bit field of Request::HEADER_*, to set which headers to trust from your proxies
* …Run Code Online (Sandbox Code Playgroud)