rolandjesse.de/_includes/force-https.html
Brandon Goldman f115167699 Fixes #155
2016-03-05 16:35:33 +01:00

13 lines
352 B
HTML

{% if site.force-https and jekyll.environment == "production" %}
<!-- Force HTTPS Start -->
<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>
<!-- Force HTTPS End -->
{% endif %}