diff --git a/backend/src/main/java/com/printcalculator/service/request/CustomQuoteRequestNotificationService.java b/backend/src/main/java/com/printcalculator/service/request/CustomQuoteRequestNotificationService.java
index 84e4eaf..41ecddd 100644
--- a/backend/src/main/java/com/printcalculator/service/request/CustomQuoteRequestNotificationService.java
+++ b/backend/src/main/java/com/printcalculator/service/request/CustomQuoteRequestNotificationService.java
@@ -126,6 +126,9 @@ public class CustomQuoteRequestNotificationService {
}
private String buildLogoUrl() {
- return frontendBaseUrl.replaceAll("/+$", "") + "/assets/images/brand-logo-yellow.svg";
+ String baseUrl = frontendBaseUrl == null || frontendBaseUrl.isBlank()
+ ? "http://localhost:4200"
+ : frontendBaseUrl;
+ return baseUrl.replaceAll("/+$", "") + "/assets/images/brand-logo-yellow.svg";
}
}
diff --git a/backend/src/test/java/com/printcalculator/service/shop/ShopSitemapServiceTest.java b/backend/src/test/java/com/printcalculator/service/shop/ShopSitemapServiceTest.java
index 988b13e..778a150 100644
--- a/backend/src/test/java/com/printcalculator/service/shop/ShopSitemapServiceTest.java
+++ b/backend/src/test/java/com/printcalculator/service/shop/ShopSitemapServiceTest.java
@@ -92,15 +92,15 @@ class ShopSitemapServiceTest {
assertTrue(xml.contains("https://3d-fab.ch/en/shop/accessori"));
assertTrue(xml.contains("https://3d-fab.ch/de/shop/accessori"));
assertTrue(xml.contains("https://3d-fab.ch/fr/shop/accessori"));
- assertTrue(xml.contains("hreflang=\"en\" href=\"https://3d-fab.ch/en/shop/accessori\""));
+ assertTrue(xml.contains("hreflang=\"en-CH\" href=\"https://3d-fab.ch/en/shop/accessori\""));
assertFalse(xml.contains("https://3d-fab.ch/it/shop/bozza"));
assertTrue(xml.contains("https://3d-fab.ch/it/shop/p/123e4567-supporto-bici"));
assertTrue(xml.contains("https://3d-fab.ch/en/shop/p/123e4567-bike-holder"));
assertTrue(xml.contains("https://3d-fab.ch/de/shop/p/123e4567-fahrrad-halter"));
assertTrue(xml.contains("https://3d-fab.ch/fr/shop/p/123e4567-support-velo"));
- assertTrue(xml.contains("hreflang=\"en\" href=\"https://3d-fab.ch/en/shop/p/123e4567-bike-holder\""));
- assertTrue(xml.contains("hreflang=\"de\" href=\"https://3d-fab.ch/de/shop/p/123e4567-fahrrad-halter\""));
+ assertTrue(xml.contains("hreflang=\"en-CH\" href=\"https://3d-fab.ch/en/shop/p/123e4567-bike-holder\""));
+ assertTrue(xml.contains("hreflang=\"de-CH\" href=\"https://3d-fab.ch/de/shop/p/123e4567-fahrrad-halter\""));
assertTrue(xml.contains("hreflang=\"x-default\" href=\"https://3d-fab.ch/it/shop/p/123e4567-supporto-bici\""));
assertTrue(xml.contains("2026-03-11T07:30:00Z"));
assertFalse(xml.contains("33333333-draft"));