Remove enforce_ssl setting

This commit is contained in:
Hanzei 2018-07-01 10:10:18 +02:00
parent daca1fe109
commit 8549e0c94b
No known key found for this signature in database
GPG key ID: 69A2DEFD98937BA0
2 changed files with 0 additions and 11 deletions

View file

@ -1,7 +1,6 @@
baseURL = "https://example.org/" # Your domain name. Must end with "/" baseURL = "https://example.org/" # Your domain name. Must end with "/"
DefaultContentLanguage = "en" DefaultContentLanguage = "en"
theme = "introduction" theme = "introduction"
enforce_ssl = false
# disqusshortname = "" # Enable Disqus for comments https://gohugo.io/content-management/comments # disqusshortname = "" # Enable Disqus for comments https://gohugo.io/content-management/comments
# googleAnalytics = "" # Enable Google Analytics https://gohugo.io/templates/internal/#google-analytics # googleAnalytics = "" # Enable Google Analytics https://gohugo.io/templates/internal/#google-analytics

View file

@ -12,13 +12,3 @@
{{ if .RSSLink }} {{ if .RSSLink }}
<link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" /> <link href="{{ .RSSLink }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
{{ end }} {{ end }}
<!-- HTTPS -->
{{ if .Site.Params.enforce_ssl }}
<script type="text/javascript">
var baseURL = '{{ .Site.BaseURL }}';
var host = baseURL.substring(0, baseURL.length - 1).replace(/\//g, '');
if ((host === window.location.host) && (window.location.protocol !== 'https:')) {
window.location.protocol = 'https:';
}
</script>
{{ end }}