-
Notifications
You must be signed in to change notification settings - Fork 11
The gopherjs website should use https. #37
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
Comments
Or is it blocking on isaacs/github#156? |
Use CloudFlare? |
I'm fine with using CloudFlare, but I don't know how it's meant to be used with GitHub Pages. Googling for github pages cloudflare finds this recent article: https://blog.cloudflare.com/secure-and-fast-github-pages-with-cloudflare/ Thanks for the suggestion! |
Was OK on https (IFAICR) Currently showing an error. Did you end up using CloudFlare in the end, or sticking with LetsEncrypt ? |
I don't think it ever worked. There wasn't any action taken yet. |
Could we make it work at https://gopherjs.github.io/playground/ until github supports HTTPS for custom domains ? Right now, this redirects to http://www.gopherjs.org/playground but if we could avoid this redirection, that would be a first step. Then the connection to the snippet server would also have do be done over HTTPS in order to avoid mixed content errors, but there is also a certificate problem with this server: https://snippets.gopherjs.org presents a certificate issued for |
That's not a blocking problem, I can make snippet server support HTTPS as soon as the first step is done.
Edit: Ah, I didn't notice that you mentioned https://gopherjs.github.io/playground/, which is not the same as https://www.gopherjs.org/playground/ which the original issue was about. |
Oh, apparently there's been an update at isaacs/github#156 since I created this issue in 2015. There's now: https://github.com/blog/2186-https-for-github-pages So it should be possible, at least for https://gopherjs.github.io/playground/! The only (minor?) issue with that is that it's not the canonical URL of the playground. |
https://help.github.com/articles/securing-your-github-pages-site-with-https/ says I would not be opposed to dropping the custom domain. |
Apparently the redirection https://gopherjs.github.io/playground => http://www.gopherjs.org/playground occurs as soon as a custom domain is set: https://help.github.com/articles/custom-domain-redirects-for-github-pages-sites/ A few points to consider:
|
It would take me a few minutes to fix that... Ok, might as well. I've done that. Now https://snippets.gopherjs.org/p/hy-CTQOoiM and http://snippets.gopherjs.org/p/hy-CTQOoiM both work. Before we move forward, I'm also not extremely attached to the http://www.gopherjs.org domain name (also because I don't like the |
Oh, is that so? Then I'd happily drop http support for snippets.gopherjs.org (by having it redirect to https). The only reason I made snippet.gopherjs.org work over HTTP is because I thought we had to. I actually had to go out of my way to make it work (my HTTP router is otherwise nothing more than a redirector to HTTPS). |
Yes, I can confirm this point. Mixed content only applies to HTTP resources loaded from a HTTPS page, not the other way around. Here are a few references: |
Thank you. I'll make a PR (edit: made #62) to update playground to always use HTTPS to access snippet store, since it sounds like we can make that part of the upgrade seamlessly now in a completely backwards compatible way. Then I can get rid of the machinery for HTTP snippet server support. :D |
Snippet store now supports https. Loading resources over https is always okay, even on pages served via http (the other way around is a problem). References: - https://developer.mozilla.org/en-US/docs/Web/Security/Mixed_content - https://developers.google.com/web/fundamentals/security/prevent-mixed-content/what-is-mixed-content - https://stackoverflow.com/q/20516584 Helps #37.
Snippet store now supports https. Loading resources over https is always okay, even on pages served via http (the other way around is a problem). References: - https://developer.mozilla.org/en-US/docs/Web/Security/Mixed_content - https://developers.google.com/web/fundamentals/security/prevent-mixed-content/what-is-mixed-content - https://stackoverflow.com/q/20516584 Helps #37.
There is still a little problem (e.g. when you load https://www.gopherjs.org/playground/#/X98vxh8Y97 and accept the certificate warning): |
Yes, it currently does. See https://github.com/gopherjs/snippet-store/blob/af71d7b00e2cbe970396736b6135e90d890d9c1b/main.go#L23. I'll change it to support both |
It seems you can't statically set that header to multiple domains. Instead, you need to dynamically see where the request is coming from, and if it's one of the allowed domains, set See http://stackoverflow.com/questions/1653308/access-control-allow-origin-multiple-origin-domains. |
I'm not sure if it's worth doing that now, since https://www.gopherjs.org cannot be practically used at this time (due to the certificate warning). |
Edit: I think that's not what the spec says. See http://stackoverflow.com/a/25517194/622447. |
I think this issue is fully resolved now, is it not? The website is fully https and redirects from http to https. |
Yes, it's working well, great job ! |
Now that Let's Encrypt makes it possible to create automated SSL/TLS certificates for free, is there anything stopping us from having https://www.gopherjs.org and https://www.gopherjs.org/playground/?
/cc @neelance
The text was updated successfully, but these errors were encountered: