diff --git a/autopost/server.js b/autopost/server.js index d5d05c1..df3c6cc 100644 --- a/autopost/server.js +++ b/autopost/server.js @@ -162,7 +162,13 @@ const autopostRouter = express.Router(); // Servez /public à la racine ET sous /autopost (utile si l'app est proxifiée sous /autopost) app.use(express.static(path.join(__dirname, 'public'))); -app.use('/autopost', express.static(path.join(__dirname, 'public'))); +app.use('/autopost', express.static(path.join(__dirname, 'public'), { + setHeaders: (res, path) => { + if (path.endsWith('.css')) { + res.setHeader('Content-Type', 'text/css'); + } + } +})); // Servez aussi les vendors sous /autopost app.use('/js', express.static(