add jpeg xl mime type to get_asset
This commit is contained in:
parent
d29a2a8590
commit
3fdef8b833
1 changed files with 2 additions and 1 deletions
|
@ -195,7 +195,8 @@ async fn style() -> impl response::IntoResponse {
|
|||
async fn get_asset(asset: axum::extract::Path<String>) -> impl IntoResponse {
|
||||
println!("Asset requested: {}", asset.0);
|
||||
let supported_file_types = [
|
||||
(".jpg", "image/jpeg"), (".jpeg", "image/jpeg"), (".png", "image/png")
|
||||
(".jpg", "image/jpeg"), (".jpeg", "image/jpeg"),
|
||||
(".png", "image/png"), (".jxl", "image/jxl"),
|
||||
];
|
||||
let mime = match supported_file_types.iter()
|
||||
.filter(|t| asset.0.ends_with(t.0))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue