1
0
mirror of https://git.sr.ht/~cadence/bibliogram synced 2024-11-22 08:07:30 +00:00

Proxy images in RSS

This commit is contained in:
Cadence Fish 2020-01-16 23:10:15 +13:00
parent c99de263f4
commit bdedd13124
No known key found for this signature in database
GPG Key ID: 81015DF9AA8607E1
2 changed files with 2 additions and 2 deletions

View File

@ -51,7 +51,7 @@ class Timeline {
feed_url: `${config.website_origin}/u/${this.user.data.username}/rss.xml`, feed_url: `${config.website_origin}/u/${this.user.data.username}/rss.xml`,
site_url: config.website_origin, site_url: config.website_origin,
description: this.user.data.biography, description: this.user.data.biography,
image_url: this.user.data.profile_pic_url, image_url: config.website_origin+this.user.proxyProfilePicture,
pubDate: new Date(this.user.cachedAt), pubDate: new Date(this.user.cachedAt),
ttl: this.user.getTtl(1000*60) // scale to minute ttl: this.user.getTtl(1000*60) // scale to minute
}) })

View File

@ -60,7 +60,7 @@ class GraphImage {
getFeedData() { getFeedData() {
return { return {
title: this.getIntroduction() || "No caption provided", title: this.getIntroduction() || "No caption provided",
description: rssDescriptionTemplate({src: this.data.display_url, alt: this.getAlt(), caption: this.getCaption()}), description: rssDescriptionTemplate({src: config.website_origin+proxyImage(this.data.display_url), alt: this.getAlt(), caption: this.getCaption()}),
author: this.data.owner.username, author: this.data.owner.username,
url: `${config.website_origin}/p/${this.data.shortcode}`, url: `${config.website_origin}/p/${this.data.shortcode}`,
guid: `${config.website_origin}/p/${this.data.shortcode}`, guid: `${config.website_origin}/p/${this.data.shortcode}`,