Skip to content

Commit ac37c2c

Browse files
committed
Count .png and .woff2 as shared files
These used to be served by the database handler. Now that it no longer exists, handle them in the shared resource handler directly.
1 parent 2f3e356 commit ac37c2c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/web/rustdoc.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,10 @@ impl Handler for SharedResourceHandler {
646646
let path = req.url.path();
647647
let filename = path.last().unwrap(); // unwrap is fine: vector is non-empty
648648
if let Some(extension) = Path::new(filename).extension() {
649-
if ["js", "css", "woff", "svg"].iter().any(|s| *s == extension) {
649+
if ["js", "css", "woff", "woff2", "svg", "png"]
650+
.iter()
651+
.any(|s| *s == extension)
652+
{
650653
let storage = extension!(req, Storage);
651654
let config = extension!(req, Config);
652655

0 commit comments

Comments
 (0)