Files
DailyHotApi/src/robots.txt.ts
2024-04-08 16:35:58 +08:00

14 lines
275 B
TypeScript

import type { Handler } from "hono";
import { config } from "./config.js";
const handler: Handler = (c) => {
if (config.DISALLOW_ROBOT) {
return c.text("User-agent: *\nDisallow: /");
} else {
c.status(404);
return c.text("");
}
};
export default handler;