--- /dev/null
+import type { Response } from "express";
+
+export default async ({ res }: { res: Response }) => {
+ res.setHeader("content-type", "text/plain; charset=utf-8");
+
+ res.send(`Contact: mailto:security@lemmy.ml
+ Contact: mailto:admin@` + process.env.LEMMY_UI_LEMMY_EXTERNAL_HOST + `
+ Contact: mailto:security@` + process.env.LEMMY_UI_LEMMY_EXTERNAL_HOST + `
+ Expires: 2024-01-01T04:59:00.000Z
+ `);
+};
import process from "process";
import CatchAllHandler from "./handlers/catch-all-handler";
import ManifestHandler from "./handlers/manifest-handler";
+import SecurityHandler from "./handlers/security-handler";
import RobotsHandler from "./handlers/robots-handler";
import ServiceWorkerHandler from "./handlers/service-worker-handler";
import ThemeHandler from "./handlers/theme-handler";
server.use(setDefaultCsp);
}
+server.get("/.well-known/security.txt", SecurityHandler);
server.get("/robots.txt", RobotsHandler);
server.get("/service-worker.js", ServiceWorkerHandler);
server.get("/manifest.webmanifest", ManifestHandler);