I have error in configuration using Drupal8 as below:
TRUSTED HOST SETTINGS Not enabled The trusted_host_patterns setting is not configured in settings.php. This can lead to security vulnerabilities. It is highly recommended that you configure this.
I’ve fixed this error locally put code on local setting.php:
$settings['trusted_host_patterns'] = array( '^drupal-8-2-6.dd$', '^localhost', );
But I could not fix this error on hosting setting.php even so I’ve tried different attempts as below (assuming that sf- my domain and dr31 –is side, so internet access is www.dr31.sf.com):
$settings['trusted_host_patterns'] = array( '^www.dr31.sf.com$', );
$settings['trusted_host_patterns'] = array( '^www.dr31.sf.com$', );
$settings['trusted_host_patterns'] = array( '^www.sf.com$', );
Is it possible that some hosting settings prevent to make effect of its setting.php and as the result it creates the trusted hosts error?
For ex. permission on setting php.not 644 but 444 and even I've changed it on 644 in come back to 444.
I, personally don't think that this has any affect on trusted host error. But why could not I get rid from error on hosting if I followed the same pattern as on local host where is no error?
How to fix the error of trusted host setting?
Thanks.
I've tried to change as suggested(see below) but it doesn't fix error: