This commit is contained in:
parent
930e9e92b8
commit
2e8e3a4a63
1 changed files with 6 additions and 4 deletions
|
@ -173,7 +173,9 @@ fn get_post(post: &mut Option<File>, filename: String) -> Infos {
|
||||||
|
|
||||||
#[get("/blog/rss")]
|
#[get("/blog/rss")]
|
||||||
pub async fn rss(req: HttpRequest, config: web::Data<Config>) -> impl Responder {
|
pub async fn rss(req: HttpRequest, config: web::Data<Config>) -> impl Responder {
|
||||||
HttpResponse::Ok().body(build_rss(
|
HttpResponse::Ok()
|
||||||
|
.append_header(("content-type", "application/rss+xml"))
|
||||||
|
.body(build_rss(
|
||||||
config.get_ref().to_owned(),
|
config.get_ref().to_owned(),
|
||||||
req.connection_info().to_owned(),
|
req.connection_info().to_owned(),
|
||||||
))
|
))
|
||||||
|
|
Loading…
Reference in a new issue