public function getDevServerURL($path = null)
    {
        // Using Development Environment?
        
        if (!Director::isDev()) {
            return;
        }
        
        // Obtain Development Server Config:
        
        if ($config = $this->getDevServerConfig()) {
            
            if (isset($config['host']) && isset($config['port'])) {
                
                // Auto Host Mode:
                
                if ($config['host'] === 'auto') {
                    $config['host'] = Director::host();
                }
                
                // Define Protocol:
                
                $protocol = function ($config) {
                    if (isset($config['https']) && $config['https'] !== 'auto') {
                        return sprintf('%s:', $config['https'] ? 'https' : 'http');
                    }
                };
                
                // Answer URL String:
                
                return sprintf(
                    '%s//%s:%d/%s',
                    $protocol($config),
                    $config['host'],
                    $config['port'],
                    $path
                );
                
            }
            
        }
    }