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

GitHub redirects iFrames to http #9

Closed
j-maas opened this issue Aug 1, 2018 · 1 comment
Closed

GitHub redirects iFrames to http #9

j-maas opened this issue Aug 1, 2018 · 1 comment

Comments

@j-maas
Copy link
Contributor

j-maas commented Aug 1, 2018

After you've merged #8, I wanted to check out the site. Unfortunately, I still get errors about mixed content.

However, the URLs in the iframes' src is correctly set to https. Instead, I discovered that GitHub redirects to the http version.

Unfortunately, a quick search for this issue only yielded an issue recommending adding trailing slashes. This didn't work in a quick test I did where I inserted an iFrame with a modified URL in the browser's HTML.

Repro

In Firefox's network tab (same thing happens in Chrome), I can see requests with status 304. E. g. the one to https://ncase.me/simulating/model?local=zoo/sick&edit=1.

Request headers:

Host: ncase.me
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: de,en-US;q=0.7,en;q=0.3
Accept-Encoding: gzip, deflate, br
Referer: https://ncase.me/simulating/
Connection: keep-alive
Upgrade-Insecure-Requests: 1

Response headers:

HTTP/2.0 301 Moved Permanently
server: GitHub.com
content-type: text/html
location: http://ncase.me/simulating/model/?local=zoo/sick&edit=1
access-control-allow-origin: *
expires: Wed, 01 Aug 2018 09:58:05 GMT
cache-control: max-age=600
x-github-request-id: BDD8:79BD:1C33660:26EE5EE:5B6181D5
accept-ranges: bytes
date: Wed, 01 Aug 2018 09:48:05 GMT
via: 1.1 varnish
age: 0
x-served-by: cache-hhn1531-HHN
x-cache: MISS
x-cache-hits: 0
x-timer: S1533116886.768692,VS0,VE97
vary: Accept-Encoding
x-fastly-request-id: 143e6a617da1126baaaa8f3990da778f567380d2
content-length: 178
X-Firefox-Spdy: h2

Curiously, I can access that exact URL, https://ncase.me/simulating/model?local=zoo/sick&edit=1, just fine directly with the browser.

@ncase
Copy link
Owner

ncase commented Aug 14, 2018

After trying a bunch of different things, I finally gave up and reverted this page back to HTTP. I have no idea why GitHub keeps redirecting to http. It works now, at least: http://ncase.me/simulating/

Thanks again for digging deeper into this issue, @y0hy0h!

@ncase ncase closed this as completed Aug 14, 2018
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

2 participants