fix: improve token management

This commit is contained in:
tdurieux committed 2024-06-18 12:00:53 +02:00
1 parent 9271332d5b
commit 532c094388
9 files changed
+90 -32

No files matched your search

+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)