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