Skip to content

Commit

Permalink
Moved force https js in the beginning of head
Browse files Browse the repository at this point in the history
  • Loading branch information
le4ker committed Oct 18, 2015
1 parent b8e2a44 commit 9f20fc4
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
<!-- HEAD Start -->

<head>
{% if site.force-https %}
<script>
// Don't force http when serving the website locally
if (!(window.location.host.startsWith("127.0.0.1")) && (window.location.protocol != "https:"))
window.location.protocol = "https";
</script>
{% endif %}
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
Expand Down Expand Up @@ -36,13 +43,6 @@
{% if site.favicon %}
<link rel="shortcut icon" type="image/x-icon" href="{{site.baseurl}}{{ site.favicon }}">
{% endif %}
{% if site.force-https %}
<script>
// Don't force http when serving the website locally
if (!(window.location.host.startsWith("127.0.0.1")) && (window.location.protocol != "https:"))
window.location.protocol = "https";
</script>
{% endif %}
</head>

<!-- HEAD End -->

0 comments on commit 9f20fc4

Please sign in to comment.