After saving a new content, site crash with error: Redirects to external URLs are not allowed by default, use \Drupal\Core\Routing\TrustedRedirectResponse for it. ,despite of setting trusted_host_patterns in settings.php.
After refresh page with back with errors: Notice: Undefined variable: httpHost in Drupal\domain\DomainNegotiator->isRegisteredDomain() (line 207 of modules/contrib/domain/domain/src/DomainNegotiator.php).
Drupal\domain\DomainNegotiator->isRegisteredDomain().

Problem is variable typo name in isRegisteredDomain. It is using variable with name $httpHost with is not defined. We need to use variable $hostname
I applied patch for this bug.

Comments

bibishani created an issue. See original summary.

bibishani’s picture

agentrickard’s picture

I suppose we need better tests for TrustedHosts. I would have expected to catch this in testing.

agentrickard’s picture

Status: Active » Fixed

Committed. Thank you!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.