update mime
This commit is contained in:
parent
4078149eec
commit
bde024adf3
@ -173,21 +173,37 @@ app.use('/autopost', express.static(path.join(__dirname, 'public'), {
|
|||||||
// Servez aussi les vendors sous /autopost
|
// Servez aussi les vendors sous /autopost
|
||||||
app.use('/js', express.static(
|
app.use('/js', express.static(
|
||||||
path.join(__dirname, '../node_modules/@tailwindcss/browser/dist'),
|
path.join(__dirname, '../node_modules/@tailwindcss/browser/dist'),
|
||||||
{ setHeaders: (res) => res.type('application/javascript') }
|
{ setHeaders: (res, filepath) => {
|
||||||
|
if (filepath.endsWith('.js')) {
|
||||||
|
res.setHeader('Content-Type', 'application/javascript');
|
||||||
|
}
|
||||||
|
}}
|
||||||
));
|
));
|
||||||
app.use('/jquery', express.static(
|
app.use('/jquery', express.static(
|
||||||
path.join(__dirname, '../node_modules/jquery/dist'),
|
path.join(__dirname, '../node_modules/jquery/dist'),
|
||||||
{ setHeaders: (res) => res.type('application/javascript') }
|
{ setHeaders: (res, filepath) => {
|
||||||
|
if (filepath.endsWith('.js')) {
|
||||||
|
res.setHeader('Content-Type', 'application/javascript');
|
||||||
|
}
|
||||||
|
}}
|
||||||
));
|
));
|
||||||
|
|
||||||
// Miroir des vendors sous /autopost (si reverse-proxy ne forwarde que /autopost/*)
|
// Miroir des vendors sous /autopost (si reverse-proxy ne forwarde que /autopost/*)
|
||||||
app.use('/autopost/js', express.static(
|
app.use('/autopost/js', express.static(
|
||||||
path.join(__dirname, '../node_modules/@tailwindcss/browser/dist'),
|
path.join(__dirname, '../node_modules/@tailwindcss/browser/dist'),
|
||||||
{ setHeaders: (res) => res.type('application/javascript') }
|
{ setHeaders: (res, filepath) => {
|
||||||
|
if (filepath.endsWith('.js')) {
|
||||||
|
res.setHeader('Content-Type', 'application/javascript');
|
||||||
|
}
|
||||||
|
}}
|
||||||
));
|
));
|
||||||
app.use('/autopost/jquery', express.static(
|
app.use('/autopost/jquery', express.static(
|
||||||
path.join(__dirname, '../node_modules/jquery/dist'),
|
path.join(__dirname, '../node_modules/jquery/dist'),
|
||||||
{ setHeaders: (res) => res.type('application/javascript') }
|
{ setHeaders: (res, filepath) => {
|
||||||
|
if (filepath.endsWith('.js')) {
|
||||||
|
res.setHeader('Content-Type', 'application/javascript');
|
||||||
|
}
|
||||||
|
}}
|
||||||
));
|
));
|
||||||
|
|
||||||
// --------------------------- Auth non protégée -----------------------------
|
// --------------------------- Auth non protégée -----------------------------
|
||||||
|
|||||||
@ -344,7 +344,7 @@ fi
|
|||||||
log "Vérification modules npm"
|
log "Vérification modules npm"
|
||||||
pushd "$AUTOPOST_DIR" >/dev/null
|
pushd "$AUTOPOST_DIR" >/dev/null
|
||||||
[ -f package.json ] || npm init -y >/dev/null 2>&1 || true
|
[ -f package.json ] || npm init -y >/dev/null 2>&1 || true
|
||||||
modules=(express express-session sqlite3 ansi-to-html @tailwindcss/browser autoprefixer jquery mysql2 session-file-store chokidar)
|
modules=(express express-session sqlite3 ansi-to-html @tailwindcss/browser autoprefixer jquery mysql2 session-file-store chokidar argon2)
|
||||||
missing=()
|
missing=()
|
||||||
for m in "${modules[@]}"; do
|
for m in "${modules[@]}"; do
|
||||||
npm list "$m" --depth=0 >/dev/null 2>&1 || missing+=("$m")
|
npm list "$m" --depth=0 >/dev/null 2>&1 || missing+=("$m")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user