rss: proxy links in users and subreddit feeds, fixes #359 (#361)

This commit is contained in:
Martin Lindhe 2025-02-03 04:00:58 +01:00 committed by GitHub
parent fd1c32f555
commit cb659cc8a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -605,7 +605,7 @@ pub async fn rss(req: Request<Body>) -> Result<Response<Body>, String> {
.into_iter()
.map(|post| Item {
title: Some(post.title.to_string()),
link: Some(utils::get_post_url(&post)),
link: Some(format_url(&utils::get_post_url(&post))),
author: Some(post.author.name),
content: Some(rewrite_urls(&post.body)),
pub_date: Some(DateTime::from_timestamp(post.created_ts as i64, 0).unwrap_or_default().to_rfc2822()),

View file

@ -164,7 +164,7 @@ pub async fn rss(req: Request<Body>) -> Result<Response<Body>, String> {
.into_iter()
.map(|post| Item {
title: Some(post.title.to_string()),
link: Some(utils::get_post_url(&post)),
link: Some(format_url(&utils::get_post_url(&post))),
author: Some(post.author.name),
pub_date: Some(DateTime::from_timestamp(post.created_ts as i64, 0).unwrap_or_default().to_rfc2822()),
content: Some(rewrite_urls(&post.body)),