From: Dessalines Date: Mon, 6 Sep 2021 14:25:48 +0000 (-0400) Subject: Fixing lint, adding a few endpoints. X-Git-Url: http://these/git/%7B%60/feeds/%7B%60%24%7BarchiveUrl%7D/?a=commitdiff_plain;h=890239972f78a8de31a89b368e786cfeb5307fed;p=lemmy-ui.git Fixing lint, adding a few endpoints. --- diff --git a/src/server/index.tsx b/src/server/index.tsx index 58a9691..022d4ad 100644 --- a/src/server/index.tsx +++ b/src/server/index.tsx @@ -28,21 +28,25 @@ server.use(express.json()); server.use(express.urlencoded({ extended: false })); server.use("/static", express.static(path.resolve("./dist"))); -const robotstxt = -`User-Agent: * +const robotstxt = `User-Agent: * Disallow: /login Disallow: /settings Disallow: /create_community Disallow: /create_post +Disallow: /create_private_message Disallow: /inbox +Disallow: /setup +Disallow: /admin +Disallow: /password_change Disallow: /search/ `; -// server.use(cookieParser()); -server.get("/robots.txt", async (req, res) => { - res.setHeader("content-type","text/plain; charset=utf-8") - res.send(robotstxt) + +server.get("/robots.txt", async (_req, res) => { + res.setHeader("content-type", "text/plain; charset=utf-8"); + res.send(robotstxt); }); +// server.use(cookieParser()); server.get("/*", async (req, res) => { const activeRoute = routes.find(route => matchPath(req.path, route)) || {}; const context = {} as any;