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
|
||||
app.use('/js', express.static(
|
||||
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(
|
||||
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/*)
|
||||
app.use('/autopost/js', express.static(
|
||||
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(
|
||||
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 -----------------------------
|
||||
|
||||
@ -344,7 +344,7 @@ fi
|
||||
log "Vérification modules npm"
|
||||
pushd "$AUTOPOST_DIR" >/dev/null
|
||||
[ -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=()
|
||||
for m in "${modules[@]}"; do
|
||||
npm list "$m" --depth=0 >/dev/null 2>&1 || missing+=("$m")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user