18 lines
417 B
TypeScript
18 lines
417 B
TypeScript
import type { MetadataRoute } from "next";
|
|
|
|
import { siteUrl } from "@/lib/site-url";
|
|
|
|
export default function robots(): MetadataRoute.Robots {
|
|
if (process.env.PUBLIC_MIRROR === "true") {
|
|
return { rules: { userAgent: "*", disallow: "/" } };
|
|
}
|
|
return {
|
|
rules: {
|
|
userAgent: "*",
|
|
allow: "/",
|
|
disallow: ["/admin", "/api", "/register"],
|
|
},
|
|
sitemap: `${siteUrl}/sitemap.xml`,
|
|
};
|
|
}
|