samdutton / simpl

Simplest possible examples of HTML, CSS and Javascript:
https://simpl.info
Apache License 2.0
5.19k stars 1.64k forks source link

External Webfonts blocked #95

Closed Jhaller closed 7 years ago

Jhaller commented 7 years ago

In Chrome the external fonts on /webfonts were blocked and did not load because the page was served over HTTPS but the linked style sheets were not.

Console output:

Mixed Content: The page at 'https://simpl.info/webfonts/' was loaded over HTTPS, but requested an insecure stylesheet 'http://fonts.googleapis.com/css?family=Open+Sans'. This request has been blocked; the content must be served over HTTPS.

Mixed Content: The page at 'https://simpl.info/webfonts/' was loaded over HTTPS, but requested an insecure stylesheet 'http://fonts.googleapis.com/css?family=Inconsolata&text=font&subset=latin'. This request has been blocked; the content must be served over HTTPS.

wnda commented 7 years ago

This can be fixed in one of two ways, either force HTTPS by changing the URI to https://fonts.googleapis.com/... or use the protocol-agnostic //fonts.googleapis.com/... instead.

I suggest forcing https, since the site is already HTTPS-only and // would break the web fonts to anybody tinkering with a local copy of the webpage (where // would become file:///).

samdutton commented 7 years ago

Thank you! Fixed.