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 Stylesheet presented as text/plain #2

Closed
derekslenk opened this issue Dec 26, 2019 · 8 comments
Closed

CSS Stylesheet presented as text/plain #2

derekslenk opened this issue Dec 26, 2019 · 8 comments
Labels
bug Something isn't working

Comments

@derekslenk
Copy link

derekslenk commented Dec 26, 2019

I am running linkding behind a Traefik reverse proxy and the stylesheets won't load over https because:

The stylesheet https://linkding.url.tld/static/index.css was not loaded because its MIME type, “text/plain”, is not “text/css”.

@derekslenk derekslenk changed the title CSS Stylesheet presented as text CSS Stylesheet presented as text/plain Dec 26, 2019
@derekslenk
Copy link
Author

Nvm, seems to be a traefik issue.

@bl1nk
Copy link

bl1nk commented Dec 27, 2019

Could you add how you solved it? I was able to find #3131 without a workaround or fix.

Edit: Nevermind, found your issue and the open PR to remove content-type autodetection here

@derekslenk
Copy link
Author

I am hoping this gets into the 2.0 tag of Traefik soon. I haven't dug in to see what branches the fix is in yet

@derekslenk
Copy link
Author

I am kind of bummed since I really want to use Linkding in production...it fits my needs perfectly and I just need to be able to access it from multiple locations. Maybe I throw an nginx server in there somewhere

@sissbruecker
Copy link
Owner

If it helps someone - I had the same issue when using Caddy as reverse proxy. My Caddy configuration that fixes it looks like this:

linkding.myserver.tld {
  proxy / localhost:9090 {
    transparent
  }
  mime {
    .css text/css
  }
}

@derekslenk
Copy link
Author

I do not think changing the mime type is possible in traefik. Can't it be done in the container? The proper way is to return the mime type anyways...

@sissbruecker
Copy link
Owner

@derekslenk Good catch, the issue was actually the uwsgi configuration / missing mime support in the Docker container. I updated the Docker image to add mime support, that seems to fix it for me.

@derekslenk
Copy link
Author

I will definitely check that out in a bit. I had started looking at the code but didn't get far enough

@sissbruecker sissbruecker added the bug Something isn't working label Dec 31, 2020
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

No branches or pull requests

3 participants