Merge pull request #490 from mariastervic/patch-1

[FIX] Update httpsRedirect.md
This commit is contained in:
Angelos Chalaris
2018-01-04 12:34:15 +02:00
committed by GitHub

View File

@ -9,3 +9,7 @@ const httpsRedirect = () => {
if (location.protocol !== 'https:') location.replace('https://' + location.href.split('//')[1]);
};
```
```js
httpsRedirect(); // If you are on http://mydomain.com, you are redirected to https://mydomain.com
```