I'm using Laravel 5, PHP 7, and Homestead, and for some reason when I try to access $request->ip()
I get back 192.168.10.1
. But in my /etc/hosts
file I have 192.168.10.10 homestead.test
. Then when I var_dump($request);
I get the following
...
'HTTP_HOST' => string 'homestead.test' (length=14)
'REDIRECT_STATUS' => string '200' (length=3)
'SERVER_NAME' => string 'homestead.test' (length=14)
'SERVER_PORT' => string '80' (length=2)
'SERVER_ADDR' => string '192.168.10.10' (length=13)
...
'REMOTE_ADDR' => string '192.168.10.1' (length=12)
Has anyone seen this before where the last value gets trimmed from the IP address?