Trusted Host Localhost

Submitted by Marc on Tue, 04/24/2018 - 20:29

So, the other day I ran into an oddity with Drupal 8 and local development. I've known about how to configure the Trusted Host Settings before. However, this was the first time I decided to try using the settings.local.php file and I thought why not put the trusted host for my local dev environment in there only. And of course keep my main server trusted host in the regular settings.php file. Well, as it turns out, that didn't work at all. Drupal 8 needed both my regular server hostname and the local dev hostname in the settings.php file. Good to know I suppose!