generated from nhcarrigan/template
This commit is contained in:
@@ -9,4 +9,6 @@ export const reservedSlugs = [
|
|||||||
"unsub",
|
"unsub",
|
||||||
"overlimit",
|
"overlimit",
|
||||||
"404",
|
"404",
|
||||||
|
"favicon.ico",
|
||||||
|
"robots.txt",
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -56,6 +56,12 @@ export const instantiateServer = (lynira: Lynira): void => {
|
|||||||
response.redirect("https://cdn.nhcarrigan.com/favicon/favicon.ico");
|
response.redirect("https://cdn.nhcarrigan.com/favicon/favicon.ico");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
server.get("/robots.txt", (_request, response) => {
|
||||||
|
response.header("Content-Type", "text/plain");
|
||||||
|
// Allow everything
|
||||||
|
response.send("User-agent: *\nDisallow:");
|
||||||
|
});
|
||||||
|
|
||||||
// WILDCARD: anything static must come before this route.
|
// WILDCARD: anything static must come before this route.
|
||||||
// eslint-disable-next-line max-statements -- Big function due to multiple routes.
|
// eslint-disable-next-line max-statements -- Big function due to multiple routes.
|
||||||
server.get("*", async(request, response) => {
|
server.get("*", async(request, response) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user