Replace mime type "application/ron" by "text/ron" and put it in the common crate

This commit is contained in:
Greg Burri 2025-05-09 23:45:32 +02:00
parent f9899c1aeb
commit 1c2e910dea
7 changed files with 96 additions and 129 deletions

View file

@ -6,6 +6,7 @@ edition = "2024"
[dependencies]
ron = "0.10"
http = "1.3"
serde = { version = "1.0", features = ["derive"] }
chrono = { version = "0.4", features = ["serde"] }
strum = { version = "0.27", features = ["derive"] }

View file

@ -1,5 +1,11 @@
use http::HeaderValue;
pub const MIN_PASSWORD_SIZE: usize = 8;
pub const COOKIE_DARK_THEME: &str = "dark_theme";
pub const GET_PARAMETER_USER_MESSAGE: &str = "user_message";
pub const GET_PARAMETER_USER_MESSAGE_LEVEL: &str = "user_message_icon";
// It should be "application/ron" but firefox can't display the response propertly (base64)
// in the dev tool.
pub const MIME_TYPE_RON: HeaderValue = HeaderValue::from_static("text/ron");