Kontakt: Hub-Domain-Anfragen gehen an die pressekonto-Brand-Adresse

Der WebPortalContext kennt nur die beiden Spokes - Anfragen von
pressekonto.test waeren sonst bei businessportal24 gelandet.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Kevin Adametz 2026-07-03 09:52:29 +00:00
parent 38d7cca086
commit 88d6935014
2 changed files with 21 additions and 1 deletions

View file

@ -52,7 +52,13 @@ class ContactController extends Controller
private function recipient(): string
{
$brand = WebPortalContext::fromRequest()->domainConfig['brand'] ?? [];
// Auch die Hub-Domain (pressekonto) nutzt das Formular — sie ist kein
// Spoke-Portal, daher vor dem WebPortalContext am Host unterscheiden.
if (str_contains(request()->getHost(), 'pressekonto')) {
$brand = config('domains.domains.pressekonto.brand', []);
} else {
$brand = WebPortalContext::fromRequest()->domainConfig['brand'] ?? [];
}
return $brand['contact_email'] ?? config('mail.from.address');
}