htmlpreview / htmlpreview.github.com

HTML Preview for GitHub Repositories
htmlpreview.github.com
1.51k stars 303 forks source link

nosniff blocking css loading? #131

Open maxandersen opened 1 year ago

maxandersen commented 1 year ago

I see #20 says nosniff does not break but I do see it breaking with

The resource from “https://raw.githubusercontent.com/maxandersen/presentations/main/css/custom.css” was blocked due to MIME type (“text/plain”) mismatch (X-Content-Type-Options: nosniff).

see on https://htmlpreview.github.io/?https://github.com/maxandersen/presentations/blob/1e224794c735742e3c3377a49233e38ac4648660/index.html

maxandersen commented 1 year ago

raw.gitack.com works: https://raw.githack.com/maxandersen/presentations/1e224794c735742e3c3377a49233e38ac4648660/index.html

hoijui commented 5 months ago

For me, I see the same for both links, the htmlpreview one and the raw.githack one: a blank page. It is true that there is an error about nosniff from htmlpreview, but that comes from trying to load the CSS directly first (without a proxy), which fails, and then it is tried to be loaded through a proxy and that seems to work. After that though, there are errors with Reveal not being found, and so .. my best bet is, that this causes the issues. CSS loading from github does work with other examples.

As a side-note: I recommend you use the new fork of HTML-preview mentioned at #139,