aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoah Loomans <noahloomans@gmail.com>2017-01-06 00:03:45 +0100
committerNoah Loomans <noahloomans@gmail.com>2017-01-06 00:03:45 +0100
commitaa7746fb2ee584515c76e1e165687b95efe0a579 (patch)
treedf40b2d8a8fd8d1c348472d6c11e998e67f56e4d
parent5a742876b4609e470018ddc16e41727a74b4767a (diff)
redirect http to https
-rw-r--r--_includes/head.html8
1 files changed, 7 insertions, 1 deletions
diff --git a/_includes/head.html b/_includes/head.html
index 596185a..9fc064d 100644
--- a/_includes/head.html
+++ b/_includes/head.html
@@ -4,4 +4,10 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/style/main.css">
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono" rel="stylesheet">
-</head> \ No newline at end of file
+ <script>
+ var host = "noahloomans.com";
+ if ((host == window.location.host) && (window.location.protocol != 'https:')) {
+ window.location = window.location.toString().replace(/^http:/, "https:");
+ }
+ </script>
+</head>