-
Notifications
You must be signed in to change notification settings - Fork 264
Open
Labels
Description
What happened?
Nginx will not serve static files (css, js and other) correctly, because there is no mime-types config.
The plugin generates a valid nginx.conf
but without mime-types config nginx will return a Content-Type: text/plain
header for all static files.
The correct behavior would be to see a header matching the file extension, for example Content-Type: text/css
.
To fix this we need to copy https://github.com/nginx/nginx/blob/master/conf/mime.types into the devbox.d/nginx/
folder and add the following to nginx.template
...
http{
include mime.types;
...
Steps to reproduce
- run
devbox add nginx
- add
my.css
to docroot (devbox.d/nginx/web/
) - run
curl -I http:/localhost:8081/my.css
You will see the header:
Content-Type: text/plain
Command
No response
devbox.json
Devbox version
ALL
Nix version
No response
What system does this bug occur on?
Other (please include in the description above)
Debug logs
No response