rolandjesse.de/_includes/force-https.html
2015-11-20 17:45:52 +01:00

13 lines
313 B
HTML

{% if site.force-https %}
<!-- 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 %}