Skip to content
This repository has been archived by the owner on Mar 28, 2022. It is now read-only.

Add JS HTTP->HTTPS redirect #28

Merged
merged 1 commit into from
Apr 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/source/_static/js/custom.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Read the Docs doesn't currently support HTTPS redirects for CNAME domains
// This is a hacky work around that keeps us free of having to host our own
// server-side component.
if (location.protocol != 'https:') {
location.href = 'https:' + window.location.href.substring(window.location.protocol.length);
}
1 change: 1 addition & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,4 @@ def setup(app):
}, True)
app.add_transform(AutoStructify)
app.add_stylesheet('css/custom.css')
app.add_javascript('js/custom.js')