Update httpsRedirect.md

This commit is contained in:
Angelos Chalaris
2017-12-21 14:26:15 +02:00
committed by GitHub
parent 0c86d71a4c
commit 43906a05ad

View File

@ -6,6 +6,6 @@ Use `location.protocol` to get the protocol currently being used. If it's not HT
```js ```js
const httpsRedirect = () => { const httpsRedirect = () => {
if(location.protocol !== "https:") location.replace("https://" + location.href.split("//")[1]); if(location.protocol !== "https:") location.replace("https://" + location.href.split("//")[1]);
} }
``` ```