free_zed.gitlab.io/theme-uberspot/templates/js_https.html

10 lines
302 B
HTML

{% if DOMAIN %}
<script type="text/javascript">
// Redirect to https with javascript
var host = "{{ DOMAIN }}";
if ((host == window.location.host) && (window.location.protocol != 'https:')) {
window.location = window.location.toString().replace(/^http:/, "https:");
}
</script>
{% endif %}