fix: improve token management

This commit is contained in:
tdurieux
2024-06-18 12:00:45 +02:00
parent 9271332d5b
commit 532c094388
9 changed files with 90 additions and 32 deletions
+8 -8
View File
@@ -130,14 +130,6 @@ export default async function start() {
keyGenerator,
});
app.use(
express.static(join("public"), {
etag: true,
lastModified: true,
maxAge: 3600, // 1h
})
);
app.use(function (req, res, next) {
const start = Date.now();
res.on("finish", function () {
@@ -216,6 +208,14 @@ export default async function start() {
// web view
app.use("/w/", rate, webViewSpeedLimiter, router.webview);
app.use(
express.static(join("public"), {
etag: true,
lastModified: true,
maxAge: 3600, // 1h
})
);
app
.get("/", indexResponse)
.get("/404", indexResponse)