summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/index.ts7
-rw-r--r--views/layout.pug2
2 files changed, 9 insertions, 0 deletions
diff --git a/source/index.ts b/source/index.ts
index e22478e..dac1b2d 100644
--- a/source/index.ts
+++ b/source/index.ts
@@ -12,6 +12,8 @@ const render_env = {
commit: readFileSync(join(__dirname, "../.git/refs/heads/main")).toString().substr(0, 8)
}
+app.disable('x-powered-by');
+
app.set("view engine", "pug")
app.set("views", join(__dirname, "../views"))
@@ -26,6 +28,11 @@ app.get("/licence", async (req, res) => {
res.type("text/plain").send(content)
})
+app.get("/favicon.ico", (req,res) => res.sendStatus(204)) // no content
+app.get("/robots.txt", (req,res) => {
+ res.send("User-Agent: *\nDisallow: /")
+})
+
const PORT = parseInt(process.env.PORT ?? "8080")
const HOST = process.env.HOST || "127.0.0.1"
diff --git a/views/layout.pug b/views/layout.pug
index 2d960f7..c1479b2 100644
--- a/views/layout.pug
+++ b/views/layout.pug
@@ -1,7 +1,9 @@
+doctype html
// SPDX-License-Identifier: AGPL-3.0-only
html(lang="en")
head
meta(charset="UTF-8")
+ meta(name="viewport", content="width=device-width, initial-scale=1.0")
title metamuffin.org
body
header