From f4431c0872f99a03e8fda7dac6b5ef093be7f447 Mon Sep 17 00:00:00 2001 From: Ilya Kreymer Date: Sun, 23 Nov 2014 18:44:11 -0800 Subject: [PATCH] wombat: add extra check for correct scheme for ajax open --- pywb/static/wombat.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pywb/static/wombat.js b/pywb/static/wombat.js index 971a8fe4..a16ce99e 100644 --- a/pywb/static/wombat.js +++ b/pywb/static/wombat.js @@ -478,6 +478,13 @@ _WBWombat = (function() { async = true; } + // extra check for correct scheme here.. maybe move to rewrite_url.. + var curr_scheme = window.location.protocol + '//'; + + if (starts_with(url, wb_orig_scheme) && (wb_orig_scheme != curr_scheme)) { + url = curr_scheme + url.substring(wb_orig_scheme.length); + } + return orig.call(this, method, url, async, user, password); } @@ -899,7 +906,7 @@ _WBWombat = (function() { init_seeded_random(timestamp); // Date - // init_date_override(timestamp); + init_date_override(timestamp); // expose functions this.extract_orig = extract_orig;