feat: add cache-control:no-cache while sending file and index
parent
e576ddcbea
commit
7e9e770ffe
|
@ -838,6 +838,8 @@ impl Server {
|
|||
}
|
||||
}
|
||||
|
||||
res.headers_mut()
|
||||
.typed_insert(CacheControl::new().with_no_cache());
|
||||
res.headers_mut().typed_insert(last_modified);
|
||||
res.headers_mut().typed_insert(etag.clone());
|
||||
|
||||
|
@ -958,6 +960,8 @@ impl Server {
|
|||
.replace("__INDEX_DATA__", &index_data);
|
||||
res.headers_mut()
|
||||
.typed_insert(ContentLength(output.as_bytes().len() as u64));
|
||||
res.headers_mut()
|
||||
.typed_insert(CacheControl::new().with_no_cache());
|
||||
if head_only {
|
||||
return Ok(());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue