WithRemoteAddress
trait WithRemoteAddress
Methods
static string
getRemoteAddress()
Gets remote IP address.
static bool
isFromLocalHost()
No description
Details
at line 21
static string
getRemoteAddress()
Gets remote IP address.
This is intended as a drop-in replacement for $_SERVER['REMOTE_ADDR'], which takes in consideration proxy values, blindly trusted.
This method should is only for environment where headers are controlled, like nginx + phpfpm, where HTTP headers are reserved for the server information, and where the headers sent by the web server to nginx are checked or populated by nginx itself.
at line 25
static bool
isFromLocalHost()
No description