mirror of
https://github.com/TabbyML/tabby
synced 2024-11-22 00:08:06 +00:00
fix(ui): only generate cache header for files under /_next/ (thus file name got hashed checksum) (#2513)
This commit is contained in:
parent
52546e777e
commit
b4d2477d37
@ -32,7 +32,7 @@ where
|
||||
let body = Body::from(content.data);
|
||||
let mime = mime_guess::from_path(&path).first_or_octet_stream();
|
||||
let mut builder = Response::builder().header(header::CONTENT_TYPE, mime.as_ref());
|
||||
if !path.ends_with(".html") {
|
||||
if path.starts_with("_next/") {
|
||||
builder = builder.header(header::CACHE_CONTROL, "public, max-age=604800");
|
||||
};
|
||||
builder
|
||||
|
Loading…
Reference in New Issue
Block a user