Setting a trusted proxy allows for correct URL generation, redirecting, session handling and logging in Laravel when behind a reverse proxy such as a load balancer or cache. Laravel 5.5+ comes with this package. If you are using Laravel 5.5 or greater, you do not need to add this to your project separately. Setting a trusted proxy allows for correct URL generation, redirecting, session handling and logging in Laravel when behind a reverse proxy. This is useful if your web servers sit behind a load balancer (Nginx, HAProxy, Envoy, ELB/ALB, etc), HTTP cache (CloudFlare, Squid, Varnish, etc), or other intermediary (reverse) proxy. Laravel (technically the Symfony HTTP base classes) have a concept of a "trusted proxy", where those X-Forwarded headers will only be used if the source IP address of the request is known. In other words, it only trusts those headers if the proxy is trusted.

Features

  • Setting a trusted proxy allows for correct URL generation, redirecting, session handling and logging in Laravel
  • You can set the IP addresses of the proxies
  • Laravel 5.5+ comes with this package
  • Refer to the docs provided for using Trusted Proxy in Laravel 5.5+
  • For Nginx, HAProxy, Envoy, ELB/ALB, etc.

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow Laravel Trusted Proxies

Laravel Trusted Proxies Web Site

Other Useful Business Software
Stay in Flow. Let Zenflow Handle the Heavy Lifting. Icon
Stay in Flow. Let Zenflow Handle the Heavy Lifting.

Your AI engineering control center. Zenflow turns specs into shipped features using parallel agents and multi-repo intelligence.

Zenflow is your engineering control center, turning specs into shipped features. Parallel agents handle coding, testing, and refactoring with real repo context. Multi-agent workflows remove bottlenecks and automate routine work so developers stay focused and in flow.
Try free now
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Laravel Trusted Proxies!

Additional Project Details

Programming Language

PHP

Related Categories

PHP HTTP Servers, PHP Load Balancers, PHP Reverse Proxy Server

Registered

2021-08-04