diff --git a/karma-tests/wombat.spec.js b/karma-tests/wombat.spec.js index bdaf49f0..4204389f 100644 --- a/karma-tests/wombat.spec.js +++ b/karma-tests/wombat.spec.js @@ -142,6 +142,7 @@ describe('WombatJS', function () { initScript: function () { wbinfo = { wombat_opts: {}, + wombat_scheme: 'http', prefix: window.location.origin, wombat_ts: '', is_live: false, @@ -183,6 +184,7 @@ describe('WombatJS', function () { wombat_opts: {}, prefix: window.location.origin, wombat_ts: '', + wombat_scheme: 'http', is_live: false, top_url: '' }; @@ -205,6 +207,7 @@ describe('WombatJS', function () { initScript: function () { wbinfo = { wombat_opts: {}, + wombat_scheme: 'http', is_live: false, top_url: '' }; diff --git a/pywb/static/wombat.js b/pywb/static/wombat.js index 4852d427..216058e9 100644 --- a/pywb/static/wombat.js +++ b/pywb/static/wombat.js @@ -505,7 +505,7 @@ var _WBWombat = function($wbwindow, wbinfo) { } if (href != orig_href && !starts_with(href, VALID_PREFIXES)) { - href = HTTP_PREFIX + href; + href = wb_orig_scheme + href; } } @@ -514,7 +514,7 @@ var _WBWombat = function($wbwindow, wbinfo) { } if (starts_with(href, REL_PREFIX)) { - href = "http:" + href; + href = wb_info.wombat_scheme + ":" + href; } return href;