sync changes

This commit is contained in:
Enstrayed
2025-10-01 09:50:32 -07:00
parent 4de76c34c2
commit b1ac3d6f58
16 changed files with 114 additions and 60 deletions

View File

@@ -8,4 +8,12 @@ app.get("/dynamic/icon/*", (rreq, rres) => {
} catch {
rres.sendStatus(404)
}
})
app.get("/dynamic/background/*", (rreq,rres) => {
if (rreq.headers["accept"].includes("image/jxl")) {
rres.setHeader("Content-Type", "image/jxl").sendFile( `${process.cwd()}/website/dynamic/backgrounds/${rreq.path.split("/")[3]}.jxl`)
} else {
rres.setHeader("Content-Type", "image/jpeg").sendFile( `${process.cwd()}/website/dynamic/backgrounds/${rreq.path.split("/")[3]}.jpg`)
}
})