mirror of
https://github.com/OMGeeky/twba.code-receiver.git
synced 2026-02-23 15:49:55 +01:00
disallow crawling and remove errors for it
This commit is contained in:
@@ -32,6 +32,11 @@ async fn handle_request(req: Request<Body>) -> Result<Response<Body>, Infallible
|
|||||||
(&Method::GET, "/googleapi/auth") => auth_get(req).await,
|
(&Method::GET, "/googleapi/auth") => auth_get(req).await,
|
||||||
(&Method::GET, "/") => Ok(Response::new(Body::from("Hello, World!"))),
|
(&Method::GET, "/") => Ok(Response::new(Body::from("Hello, World!"))),
|
||||||
(&Method::GET, "/favicon.ico") => Ok(Response::default()),
|
(&Method::GET, "/favicon.ico") => Ok(Response::default()),
|
||||||
|
(&Method::GET, "/robots.txt") => {
|
||||||
|
Ok(Response::new(Body::from("User-agent: *\nDisallow: /")))
|
||||||
|
}
|
||||||
|
(&Method::GET, "sitemap.xml") => Ok(Response::default()),
|
||||||
|
(&Method::GET, "/health") => Ok(Response::new(Body::from("OK"))),
|
||||||
other => {
|
other => {
|
||||||
error!("404: {:?} {:?}", other.0, other.1);
|
error!("404: {:?} {:?}", other.0, other.1);
|
||||||
let mut not_found = Response::default();
|
let mut not_found = Response::default();
|
||||||
|
|||||||
Reference in New Issue
Block a user