mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-16 05:36:50 +00:00
Disable legacy media request fallbacks by default.
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
1 parent
4c35bfbda4
commit
6b7bf80de5
3 files changed
+18
-2
No files matched your search
@@ -35,7 +35,9 @@ pub async fn fetch_remote_thumbnail(
|
||||
.fetch_thumbnail_authenticated(mxc, user, server, timeout_ms, dim)
|
||||
.await;
|
||||
|
||||
if let Err(Error::Request(NotFound, ..)) = &result {
|
||||
if let Err(Error::Request(NotFound, ..)) = &result
|
||||
&& self.services.server.config.request_legacy_media
|
||||
{
|
||||
return self
|
||||
.fetch_thumbnail_unauthenticated(mxc, user, server, timeout_ms, dim)
|
||||
.await;
|
||||
@@ -58,7 +60,9 @@ pub async fn fetch_remote_content(
|
||||
.fetch_content_authenticated(mxc, user, server, timeout_ms)
|
||||
.await;
|
||||
|
||||
if let Err(Error::Request(NotFound, ..)) = &result {
|
||||
if let Err(Error::Request(NotFound, ..)) = &result
|
||||
&& self.services.server.config.request_legacy_media
|
||||
{
|
||||
return self
|
||||
.fetch_content_unauthenticated(mxc, user, server, timeout_ms)
|
||||
.await;
|
||||
|
||||
Reference in new issue
Block a user