79785101

Date: 2025-10-08 05:28:03
Score: 1.5
Natty:
Report link

In my case, I used "fideloper/proxy": "^4.0" in Laravel 8.

In Laravel 9+, it is not necessary as it is built in, you are save to remove the line of "fideloper/proxy" in composer.json.

Just make sure you go to app/Http/Middleware/TrustProxies.php and modify the $headers:

protected $headers = Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_HOST | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO | Request::HEADER_X_FORWARDED_AWS_ELB;

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: alienic