Код: Выделить всё
Resource interpreted as Stylesheet but transferred with MIME type text/plain: "http://localhost:13000/styles.css".
< /code>
Когда я проверяю заголовок ответа в веб -браузере файла CSS: < /p>
Content-Type: text/plain
< /code>
Я знаю, что в стеке у нас есть много проблем с ним, я уже читал их, но все еще не работает.
< /code>
my /etc/nginx/nginx.conf is: < /p>
worker_processes 1;
events {
worker_connections 512;
}
http {
server {
listen 80;
server_name 0.0.0.0:80;
include /etc/nginx/mime.types;
root /project/app;
location ~* ^.+\.(js|css)$ {
expires 10d;
}
}
}
< /code>
Я попробовал без какой -либо части местоположения или попробовал: < /p>
location ~ \.css {
add_header Content-Type text/css;
}
< /code>
В некоторых ответах в других потоках я видел, что эта часть требуется: < /p>
default_type application/octet-stream;
include /etc/nginx/mime.types;
Подробнее здесь: https://stackoverflow.com/questions/547 ... text-plain