CodeForAfrica/GenderGap.AFRICA

Redirect to HTTPS when loaded on HTTP

Closed this issue · 0 comments

Keeping things secure, let's redirect to https when loaded on HTTP.

The code we use elsewhere:

<head>
...
<script type="text/javascript">
  var host = "{{ site.enforce_ssl }}";
  if ((host == window.location.host) && (window.location.protocol != "https:"))
    window.location.protocol = "https";
</script>
...
</head>