from typing import Dict


def update_config(server_conf: Dict, config: Dict) -> Dict:
    """Set the netbox configuration correctly to connect to the
    server

    Args:
        server_conf (Dict): server configuration
        config (Dict): netbox configuration

    Returns:
        Dict: updated netbox configuration
    """
    config['tag'] = server_conf['tag']
    config['namespace'] = server_conf['namespace']
    config['url'] = 'http'
    if server_conf['use_ssl']:
        config['url'] = 'https'
        if server_conf['use_ssl'] == 'self-signed':
            config['ssl-verify'] = False
    config['url'] += f'://127.0.0.1:{server_conf["port"]}'
    return config