diff --git a/config/defaults.hjson b/config/defaults.hjson index 59b808f8d..f23b1fb13 100644 --- a/config/defaults.hjson +++ b/config/defaults.hjson @@ -39,6 +39,8 @@ docs_dir: "/app/documentation" # address where pictrs is available pictrs_url: "http://pictrs:8080" + # address where iframely is available + iframely_url: "http://iframely" # rate limits for various user actions, by user ip rate_limit: { # maximum number of messages created in interval diff --git a/lemmy_utils/src/request.rs b/lemmy_utils/src/request.rs index cbd778c6e..6b282c47a 100644 --- a/lemmy_utils/src/request.rs +++ b/lemmy_utils/src/request.rs @@ -58,7 +58,7 @@ pub(crate) async fn fetch_iframely( client: &Client, url: &str, ) -> Result { - let fetch_url = format!("http://iframely/oembed?url={}", url); + let fetch_url = format!("{}/oembed?url={}", Settings::get().iframely_url, url); let response = retry(|| client.get(&fetch_url).send()).await?; diff --git a/lemmy_utils/src/settings.rs b/lemmy_utils/src/settings.rs index 8e073c944..960c48b85 100644 --- a/lemmy_utils/src/settings.rs +++ b/lemmy_utils/src/settings.rs @@ -16,6 +16,7 @@ pub struct Settings { pub docs_dir: PathBuf, pub jwt_secret: String, pub pictrs_url: String, + pub iframely_url: String, pub rate_limit: RateLimitConfig, pub email: Option, pub federation: FederationConfig,