A Laravel package for configuring trusted proxies to ensure correct URL generation, redirects, and sessions behind load balancers.
Laravel Trusted Proxy is a PHP package that configures Laravel applications to correctly interpret HTTP requests when behind reverse proxies like load balancers or CDNs. It solves the problem of applications misidentifying client details (e.g., using proxy IPs instead of real client IPs) by properly trusting and reading X-Forwarded headers. This ensures accurate URL generation, redirects, sessions, and logging in production setups.
Laravel developers deploying applications behind load balancers, reverse proxies, or caching services (e.g., AWS ELB/ALB, Nginx, CloudFlare) who need correct client information handling.
Developers choose this package because it provides a simple, standardized way to configure trusted proxies in Laravel, eliminating common issues with URL generation and session handling in proxied environments. Its integration with Laravel's request handling and Symfony HTTP components offers reliability and security by allowing precise control over which proxies are trusted.
Laravel Proxy Package for handling sessions when behind load balancers or other intermediaries.
Simplifies setting trusted proxy IPs in Laravel, avoiding manual adjustments to Symfony HTTP classes as described in the README, making it accessible for common deployment scenarios.
Ensures correct URL generation, redirects, and session handling by reading X-Forwarded headers from trusted proxies, critical for load-balanced setups like AWS ELB where SSL termination occurs.
Allows trust configuration for specific proxies, reducing the risk of header spoofing compared to trusting all proxies indiscriminately, as highlighted in the security awareness feature.
Supports common proxies like Nginx, HAProxy, AWS ELB/ALB, and CloudFlare, with a wiki listing IP addresses for popular services, making it versatile for production environments.
Not needed for Laravel 9.x and above, as built-in functionality exists; using it can lead to conflicts or redundancy, and the README explicitly advises against it for Laravel 9.x.
For services like AWS ELB with unknown IPs, you must trust all proxies, which the README notes increases vulnerability to spoofed headers, a significant trade-off in security.
Specifically tailored for Laravel, so it's useless for applications built on other PHP frameworks or custom codebases, limiting its utility in mixed-technology stacks.
A full-stack framework for Laravel that takes the pain out of building dynamic UIs.
Debugbar for Laravel (Integrates PHP Debug Bar)
IDE Helper for Laravel
PHP Image Processing
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.