The first visit of a shared link by someone else earns the sharer one free natal analysis, once per user. The share page reports visits from the visitor's browser; robots, the logged-in sharer and the address the link was made at do not count. The share button is a proper card that says so in small print; /v1/me tells whether the reward is used up. Robots: reading a share writes nothing (view_count counts people only), the frontend keeps shared content for five minutes (cleared when a link is revoked), and robots.txt turns away the known AI crawlers while leaving the link preview robots alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
50 lines
1.2 KiB
TypeScript
50 lines
1.2 KiB
TypeScript
import type { MetadataRoute } from "next";
|
|
|
|
// AI crawlers that train models or answer from the site: they load pages
|
|
// far more often than visitors do. Link preview robots (Facebook, Messenger,
|
|
// Slack, WhatsApp, X, LinkedIn) stay allowed, they make the shared links work.
|
|
const AI_CRAWLERS = [
|
|
"GPTBot",
|
|
"ChatGPT-User",
|
|
"OAI-SearchBot",
|
|
"ClaudeBot",
|
|
"Claude-User",
|
|
"Claude-SearchBot",
|
|
"anthropic-ai",
|
|
"CCBot",
|
|
"Google-Extended",
|
|
"GoogleOther",
|
|
"Applebot-Extended",
|
|
"PerplexityBot",
|
|
"Perplexity-User",
|
|
"Bytespider",
|
|
"Amazonbot",
|
|
"meta-externalagent",
|
|
"meta-externalfetcher",
|
|
"FacebookBot",
|
|
"cohere-ai",
|
|
"cohere-training-data-crawler",
|
|
"Diffbot",
|
|
"ImagesiftBot",
|
|
"Omgilibot",
|
|
"Omgili",
|
|
"YouBot",
|
|
"Timpibot",
|
|
"AI2Bot",
|
|
"Ai2Bot-Dolma",
|
|
"DuckAssistBot",
|
|
"MistralAI-User",
|
|
"PetalBot",
|
|
"Scrapy",
|
|
];
|
|
|
|
export default function robots(): MetadataRoute.Robots {
|
|
return {
|
|
rules: [
|
|
{ userAgent: AI_CRAWLERS, disallow: "/" },
|
|
// Logged-in pages redirect anyway; shared links carry noindex.
|
|
{ userAgent: "*", allow: "/", disallow: ["/api/", "/admin", "/profil", "/kepletek", "/osszevetesek", "/szemelyek"] },
|
|
],
|
|
};
|
|
}
|