This commit is contained in:
parent
8761b57f80
commit
dcba9beba2
|
@ -175,7 +175,11 @@ async fn rss() -> Result<impl IntoResponse, StatusCode> {
|
|||
.items(posts)
|
||||
.build();
|
||||
|
||||
return Ok(channel.to_string());
|
||||
return Ok(Response::builder()
|
||||
.header("content-type", "application/rss+xml")
|
||||
.status(StatusCode::OK)
|
||||
.body(Full::from(channel.to_string()))
|
||||
.unwrap());
|
||||
}
|
||||
|
||||
fn header(page_title: &str) -> Markup {
|
||||
|
@ -328,7 +332,6 @@ async fn blog_post(Path(post): Path<String>) -> Result<impl IntoResponse, Status
|
|||
|
||||
return Ok(Response::builder()
|
||||
.header("content-type", "text/html")
|
||||
.header("cache", "hit")
|
||||
.status(StatusCode::OK)
|
||||
.body(Full::from(html.into_string()))
|
||||
.unwrap());
|
||||
|
|
Loading…
Reference in a new issue