refactor(AppServiceProvider): simplify client IP retrieval logic
Removed unnecessary environment check for local client IP.
This commit is contained in:
parent
05ececd879
commit
2529118bcc
1 changed files with 0 additions and 4 deletions
|
|
@ -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();
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue