InkSoul/themes/meme_cdn/assets/js/force-https.js

7 lines
192 B
JavaScript
Raw Normal View History

2023-06-18 23:16:41 +08:00
{{ $url := urls.Parse .Site.BaseURL }}
{{ $host := $url.Host }}
if (window.location.host == "{{ $host }}" && window.location.protocol != "https:") {
window.location.protocol = "https";
}