'Helper internal method to actually find the microsite configuration'

def _set_microsite_config(self, microsite_config_key, subdomain, domain):

    config = settings.MICROSITE_CONFIGURATION[microsite_config_key].copy()
    config['subdomain'] = strip_port_from_host(subdomain)
    config['microsite_config_key'] = microsite_config_key
    config['site_domain'] = strip_port_from_host(domain)
    template_dir = ((settings.MICROSITE_ROOT_DIR / microsite_config_key) / 'templates')
    config['template_dir'] = template_dir
    self.current_request_configuration.data = config
