fix: read BASE_URL from env for RSS channel link
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
DATABASE_URL=sqlite:./dev.db
|
DATABASE_URL=sqlite:./dev.db
|
||||||
|
BASE_URL=http://localhost:3000
|
||||||
PORT=3000
|
PORT=3000
|
||||||
JWT_SECRET=
|
JWT_SECRET=
|
||||||
JWT_TTL_SECONDS=
|
JWT_TTL_SECONDS=
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ async fn wire_dependencies() -> anyhow::Result<AppState> {
|
|||||||
app_ctx,
|
app_ctx,
|
||||||
html_renderer: Arc::new(AskamaHtmlRenderer::new()),
|
html_renderer: Arc::new(AskamaHtmlRenderer::new()),
|
||||||
rss_renderer: Arc::new(RssAdapter::new(
|
rss_renderer: Arc::new(RssAdapter::new(
|
||||||
"http://localhost:3000".into(),
|
std::env::var("BASE_URL").unwrap_or_else(|_| "http://localhost:3000".into()),
|
||||||
)),
|
)),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user