Merge pull request #1246 from knkski/pictrs-url-variable

Fix hardcoded pictrs URL reference
This commit is contained in:
Dessalines 2020-11-01 22:45:03 -05:00 committed by GitHub
commit 18d9811de7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -88,7 +88,8 @@ pub(crate) async fn fetch_pictrs(
is_image_content_type(client, image_url).await?; is_image_content_type(client, image_url).await?;
let fetch_url = format!( 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 utf8_percent_encode(image_url, NON_ALPHANUMERIC) // TODO this might not be needed
); );