mirror of
https://github.com/redlib-org/redlib.git
synced 2025-06-07 23:27:51 +00:00
Cache robots.txt
This commit is contained in:
parent
0f506fc41b
commit
b33d79ed9b
2 changed files with 10 additions and 13 deletions
|
@ -16,7 +16,9 @@ async fn style() -> HttpResponse {
|
|||
}
|
||||
|
||||
async fn robots() -> HttpResponse {
|
||||
HttpResponse::Ok().body(include_str!("../static/robots.txt"))
|
||||
HttpResponse::Ok()
|
||||
.header("Cache-Control", "public, max-age=1209600, s-maxage=86400")
|
||||
.body(include_str!("../static/robots.txt"))
|
||||
}
|
||||
|
||||
#[get("/favicon.ico")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue