Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure always goes to https #1

Closed
DavidLemayian opened this issue May 2, 2017 · 0 comments
Closed

Ensure always goes to https #1

DavidLemayian opened this issue May 2, 2017 · 0 comments

Comments

@DavidLemayian
Copy link

In _config.yml lets add:

url: https://opengazettes.or.ke   # with the https protocol
enforce_ssl: opengazettes.or.ke   # without any protocol

In <head>:

<script type="text/javascript">
  var host = "{{ site.enforce_ssl }}";
  if ((host == window.location.host) && (window.location.protocol != "https:"))
      window.location.protocol = "https";
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant