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

Bug: mime types not provided in response headers #477

Closed
mpfl opened this issue Jul 25, 2024 · 1 comment · Fixed by #478
Closed

Bug: mime types not provided in response headers #477

mpfl opened this issue Jul 25, 2024 · 1 comment · Fixed by #478
Labels
bug Something isn't working

Comments

@mpfl
Copy link
Contributor

mpfl commented Jul 25, 2024

Is this urgent?

No

What parts are affected

Frontend

What is the server version

96

What is the client version

96

What platform are you using

Web

What's the problem 🤔

The kitchenowl docker image does not include the media-types package, which means that the HTTP response headers do not specify a MIME type for served files. This is a problem when using kitchenowl behind a reverse proxy that adds the x-content-type-options: nosniff header as it prevents the browser from inferring the MIME type by itself.

The end result is that HTML and Javascript files are treated as plain text and not rendered properly in-browser.

Manually adding the media-types package by running apt install media-types inside the container and restarting the container fixes the issue, but destroying and re-creating the container will make the issue arise again.

This should be resolvable by modifying the dockerfile to include the media-types package.

Share your logs

No response

Share your configuration

No response

@mpfl mpfl added the bug Something isn't working label Jul 25, 2024
@Semoar
Copy link

Semoar commented Sep 7, 2024

Thanks for reporting and fixing the issue.

If someone else has the same problem: I worked around it with this nginx snippet:

location / {
  add_header Content-Type "text/html; charset=utf-8";
  proxy_pass http://localhost:8080;
}

location /api {
  proxy_pass http://localhost:8080;
}

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.

2 participants