diff --git a/web/src/endpoints/imprint.rs b/web/src/endpoints/imprint.rs
index 7a2c0a2f..555959e4 100644
--- a/web/src/endpoints/imprint.rs
+++ b/web/src/endpoints/imprint.rs
@@ -7,6 +7,7 @@ use crate::utils::{ApplicationError, Customization, TemplateResponse};
#[template(path = "imprint.html")]
struct ImprintTemplate {
webmaster_mail: String,
+ hostname: String,
}
#[actix_web::get("/imprint")]
@@ -15,6 +16,7 @@ pub async fn get_imprint(
) -> Result {
let template = ImprintTemplate {
webmaster_mail: customization.webmaster_email.clone(),
+ hostname: customization.hostname.clone(),
};
Ok(template.to_response()?)
diff --git a/web/src/main.rs b/web/src/main.rs
index 0df2ff4c..6235e549 100644
--- a/web/src/main.rs
+++ b/web/src/main.rs
@@ -52,6 +52,7 @@ async fn main() -> anyhow::Result<()> {
let mailer = Mailer::new(&config)?;
let customization = Customization {
webmaster_email: config.webmaster_email.clone(),
+ hostname: config.hostname.clone()
};
handle_command(args.command, &pool, &mailer).await?;
diff --git a/web/src/utils/app_customization.rs b/web/src/utils/app_customization.rs
index 59b435f9..f7a4d608 100644
--- a/web/src/utils/app_customization.rs
+++ b/web/src/utils/app_customization.rs
@@ -1,4 +1,5 @@
#[derive(Clone)]
pub struct Customization {
+ pub hostname: String,
pub webmaster_email: String,
}
diff --git a/web/src/utils/test_helper/test_context.rs b/web/src/utils/test_helper/test_context.rs
index b13e9a5f..1cd1e97d 100644
--- a/web/src/utils/test_helper/test_context.rs
+++ b/web/src/utils/test_helper/test_context.rs
@@ -32,6 +32,7 @@ impl DbTestContext {
> {
let customization = Customization {
webmaster_email: self.config.webmaster_email.clone(),
+ hostname: self.config.hostname.clone()
};
init_service(create_app(
diff --git a/web/templates/imprint.html b/web/templates/imprint.html
index 9fade65f..5b6243aa 100644
--- a/web/templates/imprint.html
+++ b/web/templates/imprint.html
@@ -54,7 +54,7 @@
- Vor- und Nachname z.B.
Max Mustermann
- - E-Mail Adresse z.B.
max.mustermann@brasiwa-leipzig.de
+ - E-Mail Adresse z.B.
max.mustermann@{{ hostname }}
- Funktion für Brandsicherheitswachen z.B.
Wachhabender
- Brandsicherheitswachbereich z.B.
Bereich Ost
- Zeitpunkt deines letzten Logins z.B.
2021-06-11 09:40:47
@@ -72,6 +72,9 @@
Copyright
+ Copyright 2025 Max Hohlfeld
+ Brass ist freie Software nach GNU AGPLv3 Lizenz.
{% endblock %}