I installed version 8.3.7 and today the version 8.4.0 (NOT localhost, multilingual or not), using PHP 7.0.13, MySQL 5.6.22, and made the proper settings apparently. I read about this problem, which generates this error:
Redirects to external URLs are not allowed by default, use \Drupal\Core\Routing\TrustedRedirectResponse for it.
I took the necessary steps like changing the settings.php file and inserting:
$settings['trusted_host_patterns'] = [ '^gersonvagner\.com$', '^www\.gersonvagner\.com$', ];
However, the problem persists in all instances, for example when I try to put the site under maintenance or try run cron. I don't know where else I might be going for more than a week of testing and reading. If anyone can help me.
Every time I go to validate any action in the administrative environment it returns me with this message, anyway, the changes are accepted, but always this message is shown to me. Examples: If I run cron for updates, it runs and the message appears successful, but after the screen with the message I mentioned earlier. If I put or remove the site from the maintenance mode, the same occurs, that is, the site enters or leaves the maintenance with success, but I will only know this if I return to the domain and see the status, because the screen that always appears next is with this message: "Redirects to external URLs ...". This is repeated in all changes that are made in the admin environment, such as installing or uninstalling modules or templates. I don't see what I am doing wrong.
RedirectResponsesomewhere that is linking to an external site?
$settings['trusted_host_patterns']isn't used for
TrustedRedirectResponse. It just validated the 'Host' header in the HTTP request to make sure it is valid. We need a little more information on how/what is generating your redirect here.