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