]> Untitled Git - lemmy.git/commitdiff
Fix hardcoded pictrs URL reference
authorKenneth Koski <kenneth.koski@canonical.com>
Sat, 31 Oct 2020 21:52:54 +0000 (16:52 -0500)
committerKenneth Koski <kenneth.koski@canonical.com>
Sat, 31 Oct 2020 21:52:54 +0000 (16:52 -0500)
Reads the URL from Settings instead

lemmy_utils/src/request.rs

index cbd778c6ea8065d0da103dd3e3e72af07d641e33..a3bca6fd44708af8ac5b0ff79c8cc0c61ffc78d2 100644 (file)
@@ -88,7 +88,8 @@ pub(crate) async fn fetch_pictrs(
   is_image_content_type(client, image_url).await?;
 
   let fetch_url = format!(
-    "http://pictrs:8080/image/download?url={}",
+    "{}/image/download?url={}",
+    Settings::get().pictrs_url,
     utf8_percent_encode(image_url, NON_ALPHANUMERIC) // TODO this might not be needed
   );