Releases: fideloper/TrustedProxy
Fixed bug in php7+ with symfony < 3.3
PHP7 raised an warning when non-numeric values were used in bitwise operations (e.g. $foo | $bar
where $foo
or $bar
was not a numeric value).
This resulted in a thrown ErrorException within Laravel.
This fixes that by returning out of the function before the bitwise calculation is complete, under the assumption that that condition only happens when Symfony < 3.3.
Compatibility with Symfony 3.3
Merged in PRs #70 and #73 to be compatible with Symfony 3.3, which adds a secondary parameter to the $request->setTrustedProxies()
method.
Resources to read more:
- Symfony 3.3 release notes
- PR documenting the change to TrustexProxies
- See docs here on using
setTrustedProxies
in Symfony 3.2 vs 3.3
- See docs here on using
- PR making the actual code changes to the Symfony Request object
Note: This package should be backwards compatible with Symfony 3.2 and a Laravel install using Symfony 3.2. Let me know ASAP if that's not the case for you.
Backwards compatibility with older laravel
Merged #66 to fix issues with older versions of Laravel
Set proxies in middleware
Merged PR #52
Merged PR #52 to address possibility of multiple, chained proxies (e.g. a CDN and load balancer both in use). This correctly gets the end-user (client) IP address.
3.1.0: Merge pull request #43 from GrahamCampbell/patch-5
- Lumen support
- Documentation update/improvement
Thanks @GrahamCampbell and other contributors!
Note: Composer current sets the dependencies on Laravel ~5.0, let me know if you run into issue with this on newer Laravel.
Allow Multiple Client IPs
Fixing #21, allowing multiple client IP addresses when using the *
wildcard proxy IP address.