Add caching

This commit is contained in:
Emi Simpson 2021-11-09 11:31:13 -05:00
parent 7d73f63cd4
commit 23a7cfca9a
Signed by untrusted user: Emi
GPG Key ID: A12F2C2FFDC3D847
1 changed files with 4 additions and 0 deletions

View File

@ -80,6 +80,10 @@ impl<'a> Route<'a> {
b"Location".to_owned(),
destination.as_bytes(),
).unwrap(),
Header::from_bytes(
b"Cache-Control".to_owned(),
b"max-age=86400,stale-while-revalidate=172800,stale-if-error=3155760000".to_owned(),
).unwrap(),
],
Cursor::new(Cow::Borrowed(b"")),
Some(0),