Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

css not loaded because of MIME type mismatch #27

Closed
miguelmarco opened this issue Apr 3, 2023 · 2 comments · Fixed by #60
Closed

css not loaded because of MIME type mismatch #27

miguelmarco opened this issue Apr 3, 2023 · 2 comments · Fixed by #60
Labels
bug Something isn't working

Comments

@miguelmarco
Copy link

Description

If I run a local instance of jupyterlab with rise enabled, can't load custom rise.css or notebookname.css files. The console in my broser shows the error message:

The resource from  “http://localhost:8888/files//rise.css” was blocked due to a MIME type mismatch (“text/html”) (X-Content-Type-Options: nosniff).

Reproduce

  1. Install jupyterlab_risewith pip
  2. Create a simple notebook and rise.css file
  3. show the notebook with rise

Expected behavior

the rise presentation is decorated according to the rules in rise.css

Context

  • Python package version:

  • Extension version: jupyterlab_rise 0.2.0

  • Operating System and its version: Gentoo linux

  • Browser and its version: firefox 102.9.0esr

@miguelmarco miguelmarco added the bug Something isn't working label Apr 3, 2023
@steff-mueller
Copy link

I noticed that rise.css gets loaded successfully if one puts the notebook and rise.css into a subdirectory instead of root. Otherwise, I get the same error.

@trevex
Copy link

trevex commented Oct 19, 2023

Thanks @steff-mueller using a sub-folder is indeed a workaround.

Looks like the double-slash causes the issues. Manipulating the original request from the root folder to have a single / in the path will result in successfully returning the CSS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants