From 6ee488b9c9972d0cb83fe6d38a48929e68ea4253 Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Thu, 4 Oct 2018 12:29:33 +0300 Subject: [PATCH] Fix clients that have an HTTP URL left in the local storage --- app/assets/javascripts/fix_legacy_clients.js | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 app/assets/javascripts/fix_legacy_clients.js diff --git a/app/assets/javascripts/fix_legacy_clients.js b/app/assets/javascripts/fix_legacy_clients.js new file mode 100644 index 0000000..e737ea8 --- /dev/null +++ b/app/assets/javascripts/fix_legacy_clients.js @@ -0,0 +1,5 @@ +if ('OpenFest-gauge-api' in localStorage) { + if (localStorage['OpenFest-gauge-api'].startsWith('http://')) { + localStorage['OpenFest-gauge-api'] = localStorage['OpenFest-gauge-api'].replace(/^http:\/\//, 'https://'); + } +}