refactor(AppServiceProvider): simplify client IP retrieval logic

Removed unnecessary environment check for local client IP.
This commit is contained in:
Jérémy Munsch 2026-08-13 14:58:02 +02:00
parent 05ececd879
commit 2529118bcc
Signed by: forge-joniko
GPG key ID: D7EFE2F5CB6CC0E4

View file

@ -22,10 +22,6 @@ class AppServiceProvider extends ServiceProvider
public function register(): void
{
$this->app->singleton('clientIp', function () {
if (app()->environment('local')) {
return request()->getClientIp();
}
return request()->server('HTTP_X_FORWARDED_FOR') ?? request()->getClientIp();
});
}