Nathanwoodburn.github.io/templates/assets/js/https.js

7 lines
162 B
JavaScript
Raw Permalink Normal View History

2023-02-13 20:14:50 +11:00
if (location.protocol !== 'https:') {
location.replace(`https:${location.href.substring(location.protocol.length)}`);
}
else{
console.log("Already Https");
}