Add libcurl

This commit is contained in:
MotorTruck1221 2024-03-09 02:51:29 -07:00
parent c5e05997dd
commit bf24bf53c0
No known key found for this signature in database
GPG key ID: 06901A625432AC21
4 changed files with 17 additions and 18 deletions

View file

@ -123,7 +123,14 @@ async function MasqFail(req: Request, res: Response) {
return;
}) */
app.use(express.static("dist"));
app.use(express.static("dist", {
//force .cjs files to be served as text/javascript (libcurl)
setHeaders: (res, path) => {
if (path.endsWith(".cjs")) {
res.setHeader("Content-Type", "text/javascript");
}
}
}));
app.get("/search=:query", async (req: Request, res: Response) => {
const { query } = req.params;