chore: remove useless code

This commit is contained in:
CrescentLeaf
2025-09-14 14:32:37 +08:00
parent 0af3e7a449
commit 85b48475de

View File

@@ -14,12 +14,6 @@ import FileManager from "./data/FileManager.ts"
import path from "node:path" import path from "node:path"
const app = express() 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('/', express.static(config.data_path + '/page_compiled'))
app.use('/uploaded_files/:hash', (req, res) => { app.use('/uploaded_files/:hash', (req, res) => {
const hash = req.params.hash as string const hash = req.params.hash as string