From: Kenneth Koski Date: Sat, 31 Oct 2020 21:52:54 +0000 (-0500) Subject: Fix hardcoded pictrs URL reference X-Git-Url: http://these/git/%7B%60%24%7BwebArchiveUrl%7D/%22%7B%7D/%22https:/nerdica.net/%7Brss%7D?a=commitdiff_plain;h=1ae335e0586d167eddd3b116aa0c8ace79a79cda;p=lemmy.git Fix hardcoded pictrs URL reference Reads the URL from Settings instead --- diff --git a/lemmy_utils/src/request.rs b/lemmy_utils/src/request.rs index cbd778c6..a3bca6fd 100644 --- a/lemmy_utils/src/request.rs +++ b/lemmy_utils/src/request.rs @@ -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 );