def __init__(self, *args, **kwargs): BaseController.__init__(self, *args, **kwargs) config = kwargs['config'] self.content_error_redirect = os.environ.get('CONTENT_ERROR_REDIRECT') config['csp-header'] = self.get_csp_header() self.browser_mgr = kwargs['browser_mgr'] RewriterApp.__init__(self, framed_replay=True, jinja_env=kwargs['jinja_env'], config=config) self.paths = config['url_templates'] self.cookie_tracker = CookieTracker(self.redis) self.record_host = os.environ['RECORD_HOST'] self.live_host = os.environ['WARCSERVER_HOST'] self.replay_host = os.environ.get('WARCSERVER_PROXY_HOST') if not self.replay_host: self.replay_host = self.live_host self.wam_loader = WAMLoader() self._init_client_archive_info() self.dyn_stats = DynStats(self.redis, config)
def __init__(self, *args, **kwargs): BaseController.__init__(self, *args, **kwargs) config = kwargs['config'] self.content_error_redirect = os.environ.get('CONTENT_ERROR_REDIRECT') config['csp-header'] = self.get_csp_header() self.browser_mgr = kwargs['browser_mgr'] RewriterApp.__init__(self, framed_replay=True, jinja_env=kwargs['jinja_env'], config=config) self.paths = config['url_templates'] self.cookie_tracker = CookieTracker(self.redis) self.record_host = os.environ['RECORD_HOST'] self.live_host = os.environ['WARCSERVER_HOST'] self.replay_host = os.environ.get('WARCSERVER_PROXY_HOST') if not self.replay_host: self.replay_host = self.live_host self.session_redirect_host = os.environ.get('SESSION_REDIRECT_HOST') self.wam_loader = WAMLoader() self._init_client_archive_info() self.dyn_stats = DynStats(self.redis, config)
def __init__(self, app, jinja_env, config, redis): BaseController.__init__(self, app, jinja_env, None, config) RewriterApp.__init__(self, framed_replay=True, jinja_env=jinja_env, config=config) self.paths = config['url_templates'] self.cookie_key_templ = config['cookie_key_templ'] self.cookie_tracker = CookieTracker(redis)
def __init__(self, app, jinja_env, config, redis): BaseController.__init__(self, app, jinja_env, None, config) RewriterApp.__init__(self, framed_replay=True, jinja_env=jinja_env, config=config) self.paths = config['url_templates'] self.cookie_key_templ = config['cookie_key_templ'] self.cookie_tracker = CookieTracker(redis) self.record_host = os.environ['RECORD_HOST'] self.live_host = os.environ['WEBAGG_HOST'] self.replay_host = os.environ.get('WEBAGG_PROXY_HOST') if not self.replay_host: self.replay_host = self.live_host
def __init__(self, *args, **kwargs): BaseController.__init__(self, *args, **kwargs) config = kwargs['config'] self.content_error_redirect = os.environ.get('CONTENT_ERROR_REDIRECT') config['csp-header'] = self.get_csp_header() self.browser_mgr = kwargs['browser_mgr'] RewriterApp.__init__(self, framed_replay=True, jinja_env=kwargs['jinja_env'], config=config) self.paths = config['url_templates'] self.cookie_tracker = CookieTracker(self.redis) self.record_host = os.environ['RECORD_HOST'] self.live_host = os.environ['WARCSERVER_HOST'] self.replay_host = os.environ.get('WARCSERVER_PROXY_HOST') if not self.replay_host: self.replay_host = self.live_host self.session_redirect_host = os.environ.get('SESSION_REDIRECT_HOST') self.wam_loader = WAMLoader() self._init_client_archive_info() self.dyn_stats = DynStats(self.redis, config) # BEGIN PERMA CUSTOMIZATION # Perma occasionally refuses to play back the content of certain # URLs or domains. This is a temporary workaround, until we devise # a more universally satisfactory solution. self.refuse_playback = [ url for url in os.environ.get('REFUSE_PLAYBACK', '').split(',') if url ] # We are experiencing unexpected, transient 404s that resolve on refrsh. # This is a temporary workaround/diagnostic experiment. self.sleep_on_404 = int(os.environ.get('SLEEP_ON_404', '2'))
def __init__(self, *args, **kwargs): BaseController.__init__(self, *args, **kwargs) config = kwargs['config'] self.content_error_redirect = os.environ.get('CONTENT_ERROR_REDIRECT') config['csp-header'] = self.get_csp_header() self.browser_mgr = kwargs['browser_mgr'] RewriterApp.__init__(self, framed_replay=True, jinja_env=kwargs['jinja_env'], config=config) self.paths = config['url_templates'] self.cookie_tracker = CookieTracker(self.redis) self.record_host = os.environ['RECORD_HOST'] self.live_host = os.environ['WARCSERVER_HOST'] self.replay_host = os.environ.get('WARCSERVER_PROXY_HOST') if not self.replay_host: self.replay_host = self.live_host self.session_redirect_host = os.environ.get('SESSION_REDIRECT_HOST') self.wam_loader = WAMLoader() self._init_client_archive_info() self.dyn_stats = DynStats(self.redis, config) # BEGIN PERMA CUSTOMIZATION # Perma occasionally refuses to play back the content of certain # URLs or domains. This is a temporary workaround, until we devise # a more universally satisfactory solution. self.refuse_playback = [url for url in os.environ.get('REFUSE_PLAYBACK', '').split(',') if url]
def __init__(self, app, jinja_env, config, redis): BaseController.__init__(self, app, jinja_env, None, config) config['csp-header'] = self.get_csp_header() RewriterApp.__init__(self, framed_replay=True, jinja_env=jinja_env, config=config) self.paths = config['url_templates'] self.cookie_key_templ = config['cookie_key_templ'] self.cookie_tracker = CookieTracker(redis) self.record_host = os.environ['RECORD_HOST'] self.live_host = os.environ['WARCSERVER_HOST'] self.replay_host = os.environ.get('WARCSERVER_PROXY_HOST') if not self.replay_host: self.replay_host = self.live_host self.wam_loader = WAMLoader() self._init_client_archive_info()