0

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.

  • Are you using a RedirectResponse somewhere that is linking to an external site? – Kevin Sep 29 '17 at 15:24
  • 1
    $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. – mpdonadio Sep 29 '17 at 18:41
  • @Kevin, no, I don't do this, only trying to configurate simples things, how as I say. – gersonvagner Sep 30 '17 at 0:06
  • @mpdonadio, I was edited the question, but I dont know what more I need to say... if you guide me with your doubts. – gersonvagner Sep 30 '17 at 0:08
  • Do you run a multi-lingual site? - drupal.org/node/2643466 – rooby Sep 30 '17 at 1:57
0

For me, I just needed to uncomment 'RewriteBase /' in '.htacess'. Working now. I had forgotten this little detail.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.