Skip to content

Commit b887a73

Browse files
committed
chore: disable loop prevention protection
1 parent 7889b66 commit b887a73

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/handler/download.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,13 @@ pub async fn download_image<'a>(
2626
}
2727

2828
// Check if UserAgent is valid
29+
/*
30+
* todo: this protection is temporarily disabled
31+
* because Misskey will hard-code media-proxy url to user's avatarUrl field,
32+
* which will definitely cause a recursive loop when media-proxy is enabled.
33+
* This feature should be re-enabled once this situation is resolved and
34+
* database all updated (or some old user may still facing broken image error).
35+
2936
if let Some(ua) = ua {
3037
if ua.to_lowercase().contains("misskey/") || ua.to_lowercase().contains("misskeymediaproxy")
3138
{
@@ -35,6 +42,8 @@ pub async fn download_image<'a>(
3542
}
3643
}
3744
45+
*/
46+
3847
// Start download
3948
let url = url.unwrap();
4049
let downloaded_file = match downloader.download_file(url, host).await {

0 commit comments

Comments
 (0)