mirror of
https://github.com/gethomepage/homepage.git
synced 2025-12-05 21:47:48 +01:00
20 lines
443 B
JavaScript
20 lines
443 B
JavaScript
import { getSettings } from "utils/config/config";
|
|
|
|
export async function getServerSideProps({ res }) {
|
|
const settings = getSettings();
|
|
const content = ["User-agent: *", !!settings.disableIndexing ? "Disallow: /" : "Allow: /"].join("\n");
|
|
|
|
res.setHeader("Content-Type", "text/plain");
|
|
res.write(content);
|
|
res.end();
|
|
|
|
return {
|
|
props: {},
|
|
};
|
|
}
|
|
|
|
export default function RobotsTxt() {
|
|
// placeholder component
|
|
return null;
|
|
}
|