From b4b29bedfc1cce52a504f28b84758087deb789be Mon Sep 17 00:00:00 2001
From: "Glitch (presence-button)"
Date: Sat, 9 May 2020 19:09:18 +0000
Subject: [PATCH] =?UTF-8?q?=F0=9F=98=BC=F0=9F=8E=81=20Checkpoint=20./serve?=
=?UTF-8?q?r.js:933874/26929=20./views/index.html:933874/4193?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
server.js | 3 ++-
views/index.html | 6 +-----
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/server.js b/server.js
index cc496e7..14fff32 100644
--- a/server.js
+++ b/server.js
@@ -9,7 +9,7 @@ var lastClosed = new Date("1970-01-01");
const fs = require("fs");
const db = "./.data/data.json";
-const closingTimeout = 5 * 60 * 1000; // 5 mins
+const defaultClosingTimeout = 5 * 60 * 1000; // 5 mins
try {
var content = fs.readFileSync(db, "utf8");
@@ -41,6 +41,7 @@ app.get("/", (req, res) => {
});
app.get("/img", (req, res) => {
+ const closingTimeout = (typeof req.query.closingTimeout !== 'undefined')? req.query.closingTimeout : defaultClosingTimeout;
res.header(
"Cache-Control",
"no-store, no-cache, must-revalidate, proxy-revalidate"
diff --git a/views/index.html b/views/index.html
index 4363776..9a4b288 100644
--- a/views/index.html
+++ b/views/index.html
@@ -55,11 +55,7 @@
-
+