From 6957bc3ec09b926dd32d7354cf3b065bfc2a2faa Mon Sep 17 00:00:00 2001 From: Timothy Carambat <rambat1010@gmail.com> Date: Mon, 13 Nov 2023 15:22:24 -0800 Subject: [PATCH] Robots.txt (#369) * assume default model where appropriate * merge with master and fix other model refs * disallow robots * add public file --- frontend/public/robots.txt | 2 ++ server/index.js | 5 +++++ 2 files changed, 7 insertions(+) create mode 100644 frontend/public/robots.txt diff --git a/frontend/public/robots.txt b/frontend/public/robots.txt new file mode 100644 index 000000000..77470cb39 --- /dev/null +++ b/frontend/public/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: / \ No newline at end of file diff --git a/server/index.js b/server/index.js index 5b22cca91..01473d111 100644 --- a/server/index.js +++ b/server/index.js @@ -77,6 +77,11 @@ if (process.env.NODE_ENV !== "development") { app.use("/", function (_, response) { response.sendFile(path.join(__dirname, "public", "index.html")); }); + + app.get("/robots.txt", function (_, response) { + response.type("text/plain"); + response.send("User-agent: *\nDisallow: /").end(); + }); } app.use( -- GitLab