А
Size: a a a
А
A
V
А
А
V
А
А
ИА
app.use(express.static(__dirname + '/public'));
The resource from “http://localhost:4000/public/styles.css” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff)Как это починить?
v
app.use(express.static(__dirname + '/public'));
The resource from “http://localhost:4000/public/styles.css” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff)Как это починить?
ИА
mime.getType()но все равно странно
тС
ИА
var options = {как в примере http://expressjs.com/en/api.html#example.of.express.static
setHeaders: function (res, path, stat) {
res.set('Content-Type', mime.contentType(path))
}
}
app.use(express.static(__dirname + '/public', options));
ИА
Content-Type: /home/igorfraa/Projects/expresshello/public/index.html
GS
app.use(express.static(__dirname + '/public'));
The resource from “http://localhost:4000/public/styles.css” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff)Как это починить?
И
ИА
ИА
АК
АК