From f1870c625a3b6a418a3f7a1d7ef85cab5ebe57c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=20Luka=20=C5=A0ijanec?= Date: Mon, 10 Feb 2020 19:14:31 +0100 Subject: force redirect to secure connection --- js/app.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/app.js b/js/app.js index 137541f..eebb62d 100644 --- a/js/app.js +++ b/js/app.js @@ -12,3 +12,7 @@ navigator.serviceWorker.addEventListener('message', (event) => { } }); } +if (location.protocol != 'https:') +{ + location.href = 'https:' + window.location.href.substring(window.location.protocol.length); +} -- cgit v1.2.3