From 85b48475de22d14e145915a0147819f9f0a34e63 Mon Sep 17 00:00:00 2001 From: CrescentLeaf Date: Sun, 14 Sep 2025 14:32:37 +0800 Subject: [PATCH] chore: remove useless code --- server/main.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/server/main.ts b/server/main.ts index 38487ca..db14cc0 100644 --- a/server/main.ts +++ b/server/main.ts @@ -14,12 +14,6 @@ import FileManager from "./data/FileManager.ts" import path from "node:path" const app = express() -app.use((req, res, next) => { - const url = req.originalUrl || req.url - if (/\.m?(j|t)sx?$/.test(url)) - res.setHeader('Content-Type', 'application/javascript') - next() -}) app.use('/', express.static(config.data_path + '/page_compiled')) app.use('/uploaded_files/:hash', (req, res) => { const hash = req.params.hash as string