Created
January 30, 2014 19:32
-
-
Save mabrizio/8716965 to your computer and use it in GitHub Desktop.
Robots disallow robots from CloudFront
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (req.url ~ "^/robots.txt$") { | |
if (req.http.User-Agent ~ "CloudFront") | |
{ | |
set obj.http.Content-Type = "text/plain; charset=utf-8"; | |
synthetic {"User-agent: *\nDisallow: /"}; | |
} | |
return (deliver) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment