diff --git a/config.yaml b/config.yaml index 36ce435f..94b02788 100644 --- a/config.yaml +++ b/config.yaml @@ -106,9 +106,9 @@ enable_http_proxy: true # List of route names: # : -# default route static/default for pywb defaults +# default route static/__pywb for pywb bundled static files #static_routes: -# static/default: pywb/static/ +# static/__pywb: pywb/static/ # enable cdx server api for querying cdx directly (experimental) enable_cdx_api: true diff --git a/pywb/rewrite/test/test_rewrite_live.py b/pywb/rewrite/test/test_rewrite_live.py index b7380977..233b5150 100644 --- a/pywb/rewrite/test/test_rewrite_live.py +++ b/pywb/rewrite/test/test_rewrite_live.py @@ -14,7 +14,7 @@ bn_urlrewriter = UrlRewriter('20131226101010bn_/http://example.com/some/path/ind def head_insert_func(rule, cdx): if rule.js_rewrite_location != 'urls': - return '' + return '' else: return '' @@ -74,7 +74,7 @@ def test_local_1(): 'com,example,test)/') # wombat insert added - assert '' in buff, buff + assert '' in buff, buff # JS location and JS link rewritten assert 'window.WB_wombat_location = "/pywb/20131226101010/http:\/\/example.com/dynamic_page.html"' in buff @@ -90,7 +90,7 @@ def test_local_no_head(): 'com,example,test)/') # wombat insert added - assert '' in buff + assert '' in buff # location rewritten assert 'window.WB_wombat_location = "/other.html"' in buff @@ -105,7 +105,7 @@ def test_local_no_head_banner_only(): 'com,example,test)/') # wombat insert added - assert '' in buff + assert '' in buff # location NOT rewritten assert 'window.location = "/other.html"' in buff @@ -120,7 +120,7 @@ def test_local_banner_only_no_rewrite(): 'com,example,test)/') # wombat insert added - assert '' in buff + assert '' in buff # JS location NOT rewritten, JS link NOT rewritten assert 'window.location = "http:\/\/example.com/dynamic_page.html"' in buff, buff @@ -135,7 +135,7 @@ def test_local_2_link_only_rewrite(): 'example,example,test)/nolocation_rewrite') # no wombat insert - assert '' not in buff + assert '' not in buff # JS location NOT rewritten, JS link rewritten assert 'window.location = "/pywb/20131226101010/http:\/\/example.com/dynamic_page.html"' in buff @@ -151,7 +151,7 @@ def test_local_2_js_loc_only_rewrite(): 'example,example,test,loconly)/') # wombat insert added - assert '' in buff + assert '' in buff # JS location rewritten, JS link NOT rewritten assert 'window.WB_wombat_location = "http:\/\/example.com/dynamic_page.html"' in buff @@ -166,7 +166,7 @@ def test_local_2_no_rewrite(): 'example,example,test,norewrite)/') # wombat insert added - assert '' in buff + assert '' in buff # JS location NOT rewritten, JS link NOT rewritten assert 'window.location = "http:\/\/example.com/dynamic_page.html"' in buff diff --git a/pywb/webapp/live_rewrite_handler.py b/pywb/webapp/live_rewrite_handler.py index 9ce79786..a232cb63 100644 --- a/pywb/webapp/live_rewrite_handler.py +++ b/pywb/webapp/live_rewrite_handler.py @@ -286,7 +286,7 @@ class YoutubeDLWrapper(object): #================================================================= def create_live_rewriter_app(config={}): routes = [Route('rewrite', RewriteHandler(config)), - Route('static/default', StaticHandler('pywb/static/')) + Route('static/__pywb', StaticHandler('pywb/static/')) ] return ArchivalRouter(routes, hostpaths=['http://localhost:8080']) diff --git a/pywb/webapp/views.py b/pywb/webapp/views.py index e44e1ef7..62cd4f50 100644 --- a/pywb/webapp/views.py +++ b/pywb/webapp/views.py @@ -67,7 +67,7 @@ def tojson(obj): #================================================================= class J2TemplateView(object): - env_globals = {'static_path': 'static/default', + env_globals = {'static_path': 'static/__pywb', 'packages': ['pywb']} def __init__(self, filename): diff --git a/tests/test_config.yaml b/tests/test_config.yaml index d7533951..6c68a0bf 100644 --- a/tests/test_config.yaml +++ b/tests/test_config.yaml @@ -107,7 +107,7 @@ absoulte_paths: true # : static_routes: static/test/route: pywb/static/ - static/default: pywb/static/ + static/__pywb: pywb/static/ # Enable simple http proxy mode enable_http_proxy: true