diff --git a/pywb/apps/frontendapp.py b/pywb/apps/frontendapp.py index e03c632f..2de16fa6 100644 --- a/pywb/apps/frontendapp.py +++ b/pywb/apps/frontendapp.py @@ -494,6 +494,9 @@ class FrontEndApp(object): # store original script_name (original prefix) before modifications are made environ['pywb.app_prefix'] = environ.get('SCRIPT_NAME', '') + # store original script_name (original prefix) before modifications are made + environ['ORIG_SCRIPT_NAME'] = environ.get('SCRIPT_NAME') + lang = args.pop('lang', '') if lang: pop_path_info(environ) diff --git a/pywb/apps/rewriterapp.py b/pywb/apps/rewriterapp.py index 1186db75..335a77bf 100644 --- a/pywb/apps/rewriterapp.py +++ b/pywb/apps/rewriterapp.py @@ -267,6 +267,8 @@ class RewriterApp(object): 'pywb.static_prefix', '/static/') is_proxy = ('wsgiprox.proxy_host' in environ) + environ['pywb.host_prefix'] = host_prefix + if self.use_js_obj_proxy: content_rw = self.js_proxy_rw else: diff --git a/pywb/templates/head_insert.html b/pywb/templates/head_insert.html index b1fe7f59..e1506d83 100644 --- a/pywb/templates/head_insert.html +++ b/pywb/templates/head_insert.html @@ -3,7 +3,7 @@ {% set urlsplit = cdx.url | urlsplit %} wbinfo = {}; wbinfo.top_url = "{{ top_url }}"; -{% if is_framed %} +{% if is_framed == 'true' %} // Fast Top-Frame Redirect if (window == window.top && wbinfo.top_url) { var loc = window.location.href.replace(window.location.hash, "");