We have the need for ignoring <esi:include>s for certain hostnames that cannot be handled. The only way I can do this is by hacking the parser. It would be nice to be able to tell the parser to skip some includes.
match req.get_host() {
// Tell parser to ignore this esi:include and pass it out as is.
"host.to.ignore" => ErrSkip(),
// It results in an infinite loop if pass format!(r#"<esi:include onerror="continue" src="{}"></esi:include>"#, src);
// Send all other fragment requests to the main origin
// with a cache TTL of two minutes (120s)
_ => Ok(req.with_ttl(120).send("origin_0")?)
}