← Files Fastly Agent ToolkitARCHIVED FILE
skills/fastly-fiddle/examples/robots.json
668 Bytes · Oct 10, 2026 · 18:29 UTC
{
"title": "Synthetic robots.txt via error-restart pattern",
"origins": ["https://http-me.fastly.dev"],
"vcl": {
"init": "# Synthetic robots.txt response\n# via error-restart pattern",
"recv": "if (req.url.path == \"/robots.txt\") {\n error 601;\n}",
"error": "if (obj.status == 601) {\n set obj.status = 200;\n synthetic {\"User-agent: BadBot\"};\n return(deliver);\n}"
},
"requests": [
{
"path": "/robots.txt",
"headers": "X-Custom: value\nX-Other: second",
"tests": [
"clientFetch.status is 200",
"clientFetch.bodyPreview includes \"BadBot\"",
"originFetches.count() is 0"
]
}
]
}
SHA-256: 84bba347ba86ca903f8938fbe9227bed1c1cf00d921b2a520fdc8d2855b75365