3

I've hosted my webapp to Github pages, thus website is on 'https'. But now, I want it to make a 'Http' request to some external site.(I don't have a custom domain to change hosted site to http.) I'm getting the 'Mixed-content' error -

Mixed Content: The page at 'https://username.github.io/MyHostedSite/' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://someHttpApi'. This request has been blocked; the content must be served over HTTPS.

Is there a way to proxy this so I can do a 'http' request over 'https' ?

Krishna
  • 116
  • 7

1 Answers1

0

Get a custom domain, and do DNS with Cloudflare (free)

… you can turn https on at Cloudflare (in page rules) — then you don't have to worry about github's http/https settings and mixed content errors.

There are good instructions for setting up a custom domain with github pages, you can see it here: Custom domain for GitHub project pages

You just have to decide if you want to serve your site at the apex domain, or with the www subdomain:

http://example.com vs http://www.example.com

page rules at Cloudflare look like this:

Page Rules at Cloudflare for forcing https

Rowe Morehouse
  • 4,451
  • 3
  • 28
  • 28