'Enhance the configuration.
:param list domains: list of domains to configure
:param chain_path: chain file path
:type chain_path: `str` or `None`
:raises .errors.Error: if no installer is specified in the
client.'

def enhance_config(self, domains, chain_path):

    if (self.installer is None):
        logger.warning("No    installer    is    specified,    there    isn't    any    configuration    to    enhance.")
        raise errors.Error('No    installer    available')
    enhanced = False
    enhancement_info = (('hsts', 'ensure-http-header', 'Strict-Transport-Security'), ('redirect', 'redirect', None), ('staple', 'staple-ocsp', chain_path), ('uir', 'ensure-http-header', 'Upgrade-Insecure-Requests'))
    supported = self.installer.supported_enhancements()
    for (config_name, enhancement_name, option) in enhancement_info:
        config_value = getattr(self.config, config_name)
        if (enhancement_name in supported):
            if ((config_name == 'redirect') and (config_value is None)):
                config_value = enhancements.ask(enhancement_name)
            if config_value:
                self.apply_enhancement(domains, enhancement_name, option)
                enhanced = True
        elif config_value:
            logger.warning('Option    %s    is    not    supported    by    the    selected    installer.    Skipping    enhancement.', config_name)
    msg = 'We    were    unable    to    restart    web    server'
    if enhanced:
        with error_handler.ErrorHandler(self._rollback_and_restart, msg):
            self.installer.restart()
