Files
30-seconds-of-code/test/httpsRedirect/httpsRedirect.js
2018-01-09 06:09:49 -05:00

3 lines
124 B
JavaScript

module.exports = () => {
if (location.protocol !== 'https:') location.replace('https://' + location.href.split('//')[1]);
};