fix: read BASE_URL from env for RSS channel link

This commit is contained in:
2026-05-04 21:06:51 +02:00
parent 658df38788
commit 790bb6fbb5
2 changed files with 2 additions and 1 deletions

View File

@@ -1,4 +1,5 @@
DATABASE_URL=sqlite:./dev.db
BASE_URL=http://localhost:3000
PORT=3000
JWT_SECRET=
JWT_TTL_SECONDS=

View File

@@ -109,7 +109,7 @@ async fn wire_dependencies() -> anyhow::Result<AppState> {
app_ctx,
html_renderer: Arc::new(AskamaHtmlRenderer::new()),
rss_renderer: Arc::new(RssAdapter::new(
"http://localhost:3000".into(),
std::env::var("BASE_URL").unwrap_or_else(|_| "http://localhost:3000".into()),
)),
})
}