use fastly::{Error, Request, Response, Backend};
use std::time::Duration;

#[fastly::main]
fn main(req: Request) -> Result<Response, Error> {
  let backend = Backend::builder("my_backend", "http-me.glitch.me")
    .override_host("http-me.glitch.me")
    .connect_timeout(Duration::from_secs(1))
    .first_byte_timeout(Duration::from_secs(15))
    .between_bytes_timeout(Duration::from_secs(10))
    .enable_ssl()
    .finish()?;
  Ok(req.send(backend)?)
}