TrustProxies.php 676 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace App\Http\Middleware;
  3. use Illuminate\Http\Request;
  4. use Fideloper\Proxy\TrustProxies as Middleware;
  5. class TrustProxies extends Middleware
  6. {
  7. /**
  8. * The trusted proxies for this application.
  9. *
  10. * @var array
  11. */
  12. protected $proxies;
  13. /**
  14. * The current proxy header mappings.
  15. *
  16. * @var array
  17. */
  18. protected $headers = [
  19. Request::HEADER_FORWARDED => 'FORWARDED',
  20. Request::HEADER_CLIENT_IP => 'X_FORWARDED_FOR',
  21. Request::HEADER_CLIENT_HOST => 'X_FORWARDED_HOST',
  22. Request::HEADER_CLIENT_PORT => 'X_FORWARDED_PORT',
  23. Request::HEADER_CLIENT_PROTO => 'X_FORWARDED_PROTO',
  24. ];
  25. }