Brak opisu

trustedproxy.php 1.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. return [
  3. /*
  4. * Set trusted proxy IP addresses.
  5. *
  6. * Both IPv4 and IPv6 addresses are
  7. * supported, along with CIDR notation.
  8. *
  9. * The "*" character is syntactic sugar
  10. * within TrustedProxy to trust any proxy
  11. * that connects directly to your server,
  12. * a requirement when you cannot know the address
  13. * of your proxy (e.g. if using ELB or similar).
  14. *
  15. */
  16. 'proxies' => null, // [<ip addresses>,], '*', '<ip addresses>,'
  17. /*
  18. * To trust one or more specific proxies that connect
  19. * directly to your server, use an array or a string separated by comma of IP addresses:
  20. */
  21. // 'proxies' => ['192.168.1.1'],
  22. // 'proxies' => '192.168.1.1, 192.168.1.2',
  23. /*
  24. * Or, to trust all proxies that connect
  25. * directly to your server, use a "*"
  26. */
  27. // 'proxies' => '*',
  28. /*
  29. * Which headers to use to detect proxy related data (For, Host, Proto, Port)
  30. *
  31. * Options include:
  32. *
  33. * - Illuminate\Http\Request::HEADER_X_FORWARDED_ALL (use all x-forwarded-* headers to establish trust)
  34. * - Illuminate\Http\Request::HEADER_FORWARDED (use the FORWARDED header to establish trust)
  35. * - Illuminate\Http\Request::HEADER_X_FORWARDED_AWS_ELB (If you are using AWS Elastic Load Balancer)
  36. *
  37. * - 'HEADER_X_FORWARDED_ALL' (use all x-forwarded-* headers to establish trust)
  38. * - 'HEADER_FORWARDED' (use the FORWARDED header to establish trust)
  39. * - 'HEADER_X_FORWARDED_AWS_ELB' (If you are using AWS Elastic Load Balancer)
  40. *
  41. * @link https://symfony.com/doc/current/deployment/proxies.html
  42. */
  43. 'headers' => Illuminate\Http\Request::HEADER_X_FORWARDED_ALL,
  44. ];