neoascetic / rawgithack

Serves files from github, bitbucket and gitlab, but with the correct content types
https://raw.githack.com
MIT License
577 stars 89 forks source link

HTTP proto #48

Closed determin1st closed 5 years ago

determin1st commented 5 years ago

Because of "Mixed content" limitations with the browser fetch API / xmlHttpRequest, scripts that send requests to http:// are not working.. So, should it be enabled?

neoascetic commented 5 years ago

Hello. What is your proposal for fixing this problem?

determin1st commented 5 years ago

Disable http to https url rewrite (probably)?

Here is the example URL: https://raw.githack.com/determin1st/httpFetch/master/test-3/index.html

If you open devtools console F12, and press run button you will see errors about mixed content.

With this URL: http://raw.githack.com/determin1st/httpFetch/master/test-3/index.html

No errors will appear.

neoascetic commented 5 years ago

Well, the service does not have any http -> https rewrites

determin1st commented 5 years ago

1234

neoascetic commented 5 years ago

Oh, that’s because of HSTS. That’s why I didn’t see the redirect when trying to fetch the URL with curl. I will remove the Strict-Transport-Security header from the upstream. Thank you.

neoascetic commented 5 years ago

Could you please verify?

determin1st commented 5 years ago

I've dropped chrome cache at chrome://net-internals/#hsts and it's working fine now.. Both chrome and firefox are ok - Thanks!

1234