enable caching of css
This commit is contained in:
		@@ -45,8 +45,8 @@ fn main() -> Result<(), MainError> {
 | 
			
		||||
			(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(),
 | 
			
		||||
			(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) ["/htmx.min.js"] => Response::from_file("text/css", File::open("htmx.min.js").unwrap()),
 | 
			
		||||
			(GET) ["/style.css"] => Response::from_data("text/css", CSS_FILE)
 | 
			
		||||
				.with_additional_header("Cache-Control", "max-age=3600"),
 | 
			
		||||
			_ => Response::empty_404(),
 | 
			
		||||
		)
 | 
			
		||||
	});
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user