diff options
author | metamuffin <metamuffin@yandex.com> | 2021-09-16 16:43:42 +0200 |
---|---|---|
committer | metamuffin <metamuffin@yandex.com> | 2021-09-16 16:43:42 +0200 |
commit | 3f0a762ace654e7d359c3f093dca7d1946cb14e2 (patch) | |
tree | e93c851be6a0a43fc741b72001b45dd1bbcf8a55 /source/index.ts | |
parent | 239578626ef1a6b06a4dfd3e7da42adf619d9a1b (diff) | |
download | metamuffin-website-3f0a762ace654e7d359c3f093dca7d1946cb14e2.tar metamuffin-website-3f0a762ace654e7d359c3f093dca7d1946cb14e2.tar.bz2 metamuffin-website-3f0a762ace654e7d359c3f093dca7d1946cb14e2.tar.zst |
bugfixes and optimization
Diffstat (limited to 'source/index.ts')
-rw-r--r-- | source/index.ts | 7 |
1 files changed, 7 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" |