Closed elvinkim03 closed 3 months ago
👍 Hey thanks it's been a while since I've used this template, but I think this is something you can configure on the laravel side.
I had the following on a laravel 10 project to get the correct ip to come through: https://laravel.com/docs/10.x/requests#configuring-trusted-proxies
/**
* The trusted proxies for this application.
*
* @var array|string
*/
protected $proxies = [
'10.0.0.0/8',
'127.0.0.1',
'172.16.0.0/12',
'192.168.0.0/16',
];
Looks like they've slightly changed how it's configured in Laravel 11 (https://laravel.com/docs/11.x/requests#configuring-trusted-proxies) but this is where I would look into first.
It's working now. Thanks man, appreciate it
Nice template btw ! I'm facing issue with getting client real IP and host whenever i called
$request->getHost()
or$request->ip()
cause it always return local ip. What should I do and sorry I'm not familiar with caddy