20 lines
434 B
TypeScript
20 lines
434 B
TypeScript
import { GetServerSideProps } from 'next';
|
|
|
|
export const getServerSideProps: GetServerSideProps = async (ctx) => {
|
|
const { req, res } = ctx;
|
|
|
|
const basePath = `https://${req.headers.host}`;
|
|
|
|
res.setHeader('content-type', 'text-plain');
|
|
res.write('User-agent: *\n');
|
|
res.write(`Sitemap: ${basePath}/sitemap.xml\n`);
|
|
res.write('Disallow: /api/*\n');
|
|
res.end();
|
|
|
|
return {
|
|
props: {},
|
|
};
|
|
};
|
|
|
|
export default () => {};
|