Contao\Environment::ip PHP 메소드

ip() 보호된 정적인 메소드

Return the real REMOTE_ADDR even if a proxy server is used
protected static ip ( ) : string
리턴 string The IP address of the client
    protected static function ip()
    {
        $request = \System::getContainer()->get('request_stack')->getCurrentRequest();
        if ($request === null) {
            return '';
        }
        return $request->getClientIp();
    }