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

Meta: Redirect to HTTPS #307

Closed
wants to merge 1 commit into from
Closed

Meta: Redirect to HTTPS #307

wants to merge 1 commit into from

Conversation

mathiasbynens
Copy link
Member

This “ensures” people are browsing https://tc39.github.io/ecma262/ rather than its HTTP counterpart.

Since GitHub Pages doesn’t offer HSTS or proper redirects yet, this is the best we can do.

This ensures people are browsing https://tc39.github.io/ecma262/ rather than its HTTP counterpart.

Since GitHub Pages doesn’t offer HSTS or proper redirects yet, this is the best we can do.
@@ -4,6 +4,11 @@
<link href="ecmarkup.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.4/styles/github.min.css">
<script src="ecmarkup.js"></script>
<script>
if (location.hostname === 'tc39.github.io' && location.protocol !== 'https:') {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any reason to even check the hostname?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So that it can still be tested locally, e.g. on http://localhost/.

@bterlson
Copy link
Member

Committed as 59fca32. Thanks!

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

Successfully merging this pull request may close these issues.

3 participants