use fastly::http::{Method, StatusCode};
use fastly::{Error, Request, Response};
#[fastly::main]
fn main(req: Request) -> Result<Response, Error> {
match (req.get_method(), req.get_path()) {
(&Method::GET, "/robots.txt") => {
Ok(Response::from_body("User-agent: BadBot\nDisallow: /\n"))
}
_ => Ok(
req.send("origin_0")?
),
}
}