diff --git a/src/routes/blog.rs b/src/routes/blog.rs index c62a271..0957b32 100644 --- a/src/routes/blog.rs +++ b/src/routes/blog.rs @@ -23,7 +23,7 @@ use crate::{ template::Infos, }; -const MIME_TYPE: &str = "application/rss+xml"; +const MIME_TYPE_RSS: &str = "application/rss+xml"; #[get("/blog")] pub async fn index(config: web::Data) -> impl Responder { @@ -179,7 +179,7 @@ fn get_post(post: &mut Option, filename: String) -> Infos { #[get("/blog/rss")] pub async fn rss(req: HttpRequest, config: web::Data) -> impl Responder { HttpResponse::Ok() - .append_header(("content-type", MIME_TYPE)) + .append_header(("content-type", MIME_TYPE_RSS)) .body(build_rss( config.get_ref().to_owned(), req.connection_info().to_owned(), @@ -263,7 +263,7 @@ fn build_rss(config: Config, info: ConnectionInfo) -> String { href: format!("{}/blog/rss", link_to_site), rel: "self".into(), hreflang: Some(lang.into()), - mime_type: Some(MIME_TYPE.into()), + MIME_TYPE_RSS: Some(MIME_TYPE_RSS.into()), title: Some(title.to_owned()), length: None, }],