()
| 2 | import { headers } from "next/headers"; |
| 3 | |
| 4 | export default async function robots(): Promise<MetadataRoute.Robots> { |
| 5 | const headersList = await headers(); |
| 6 | let domain = headersList.get("host") as string; |
| 7 | |
| 8 | return { |
| 9 | rules: [ |
| 10 | { |
| 11 | userAgent: "*", |
| 12 | allow: "/", |
| 13 | }, |
| 14 | ], |
| 15 | sitemap: `https://${domain}/sitemap.xml`, |
| 16 | }; |
| 17 | } |