afonsof / jenkins-material-theme

Beautify your Jenkins with the Material Design theme!
http://afonsof.com/jenkins-material-theme
MIT License
1.73k stars 357 forks source link

Resource interpreted as Stylesheet but transferred with MIME type text/plain #106

Closed meinnamehier closed 7 years ago

meinnamehier commented 7 years ago

I am using Jenkins V 2.46.1

I can access the css files (e.g. https://raw.githubusercontent.com/afonsof/jenkins-material-theme/gh-pages/dist/material-green.css), put when I apply them using the Simple Theme Plugin, nothing changes.

When I use another theme, like this one, it works: http://jenkins-contrib-themes.github.io/jenkins-neo-theme/dist/neo-light.css

meinnamehier commented 7 years ago

In the console output of Chrome I get this: Resource interpreted as Stylesheet but transferred with MIME type text/plain: "https://raw.githubusercontent.com/afonsof/jenkins-material-theme/gh-pages/dist/material-green.css".

timbru31 commented 7 years ago

Firefox even blocks this "malicious" request: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options

wbagdon commented 7 years ago

You can use rawgit to provide the correct MIME type https://cdn.rawgit.com/afonsof/jenkins-material-theme/gh-pages/dist/material-green.css

$ curl -I https://cdn.rawgit.com/afonsof/jenkins-material-theme/gh-pages/dist/material-green.css
HTTP/1.1 200 OK
Date: Sat, 08 Apr 2017 17:16:16 GMT
Content-Type: text/css;charset=utf-8
Connection: keep-alive
X-Content-Type-Options: nosniff
X-Robots-Tag: none
Access-Control-Allow-Origin: *
ETag: "a2b5c91a2b090c33ba5df33035ea4fe6f34b969e"
Cache-Control: max-age=315569000, immutable
Vary: Accept-Encoding
RawGit-Cache-Status: HIT
Server: NetDNA-cache/2.2
X-Cache: HIT
afonsof commented 7 years ago

Changed to use CDN