enable caching of css
This commit is contained in:
parent
dc6cfda291
commit
700f1d3de2
@ -45,8 +45,8 @@ fn main() -> Result<(), MainError> {
|
|||||||
(GET) ["/tree/{tree}/{method}/{key}", tree: String, method: String, key: String] =>
|
(GET) ["/tree/{tree}/{method}/{key}", tree: String, method: String, key: String] =>
|
||||||
btrfs_explorer::http_tree::http_tree(&image, &tree, Some(&method), Some(&key), request).unwrap(),
|
btrfs_explorer::http_tree::http_tree(&image, &tree, Some(&method), Some(&key), request).unwrap(),
|
||||||
(GET) ["/favicon.ico"] => Response::empty_404(),
|
(GET) ["/favicon.ico"] => Response::empty_404(),
|
||||||
(GET) ["/style.css"] => Response::from_data("text/css", CSS_FILE),// Response::from_file("text/css", File::open("style.css").unwrap()),
|
(GET) ["/style.css"] => Response::from_data("text/css", CSS_FILE)
|
||||||
// (GET) ["/htmx.min.js"] => Response::from_file("text/css", File::open("htmx.min.js").unwrap()),
|
.with_additional_header("Cache-Control", "max-age=3600"),
|
||||||
_ => Response::empty_404(),
|
_ => Response::empty_404(),
|
||||||
)
|
)
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user