2 Commits

Author SHA1 Message Date
ce9c779bb2 Merge pull request 'chore: bump version to 0.3.60 and handle webmanifest MIME types' (#108) from push-oywlvnwootxq into main
All checks were successful
Build and Push Docker Image / build (push) Successful in 9m57s
Reviewed-on: #108
2026-06-28 12:37:33 +02:00
070ca8f3e0 chore: bump version to 0.3.60 and handle webmanifest MIME types
Update PMOMusic/Cargo.toml and version.txt from 0.3.59 to 0.3.60. Add explicit application/manifest+json detection for .webmanifest files in serve_embed.rs to compensate for mime_guess limitations, converting the MIME value to an owned String and updating the CONTENT_TYPE header reference accordingly.
2026-06-28 12:37:09 +02:00
3 changed files with 11 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
[package] [package]
name = "PMOMusic" name = "PMOMusic"
version = "0.3.59" version = "0.3.60"
edition = "2024" edition = "2024"
[dependencies] [dependencies]

View File

@@ -50,10 +50,17 @@ impl<E: RustEmbed> ServeEmbed<E> {
for candidate in candidates { for candidate in candidates {
if let Some(content) = E::get(candidate) { if let Some(content) = E::get(candidate) {
let mime = mime_guess::from_path(candidate).first_or_octet_stream(); // mime_guess ne connaît pas .webmanifest (trop récent)
let mime = if candidate.ends_with(".webmanifest") {
"application/manifest+json".to_string()
} else {
mime_guess::from_path(candidate)
.first_or_octet_stream()
.to_string()
};
return Some( return Some(
( (
[(header::CONTENT_TYPE, mime.as_ref())], [(header::CONTENT_TYPE, mime.as_str())],
content.data.into_owned(), content.data.into_owned(),
) )
.into_response(), .into_response(),

View File

@@ -1 +1 @@
0.3.59 0.3.60