Problem/Motivation

In default.settings.php most of the config settings have a one line hint where it should go. This is useful when automating settings.php file generation. Trusted host configuration (trusted_host_patterns) does not have this hint.

Steps to reproduce

Look at default.settings.php.

Proposed resolution

Add missing hint.

Remaining tasks

Do it.

User interface changes

None.

API changes

None.

Data model changes

None.

Release notes snippet

None.

Issue fork drupal-3333281

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

MustangGB created an issue. See original summary.

mustanggb’s picture

Created merge request: https://git.drupalcode.org/project/drupal/-/merge_requests/3239

Would appreciate if this is accepted could it be backported to D9.

mustanggb’s picture

Issue summary: View changes
mustanggb’s picture

Status: Active » Needs review
rinku jacob 13’s picture

StatusFileSize
new97.45 KB
new89.21 KB

Reviewed Merge request !3239 on drupal version 10.1.x-dev. After the merge request we can see trusted_host_patterns on line number 708 of default.settings.php file. Need RTBC+1

smustgrave’s picture

Component: configuration system » base system
Issue tags: +Needs release manager review, +Needs Review Queue Initiative

Tagging for release manager thought.

There is already documentation for trusted_host_patterns. The example being added could lead to bad practice of users not setting a trusted host I would be afraid of

xjm’s picture

We should manually test whether the status report still displays the expected error if it's set to an empty array instead of NULL. If the error is still displayed, I think this is OK.

@Rinku Jacob 13, thank you for looking into this issue.
Posting screenshots of your codebase or command-line interface does not advance the issue, since the automated testing infrastructure tells us whether the change set still applies correctly.

So, I have not granted issue credit for that screenshot. In the future, you can get credit for issues by reading the issue to understand its purpose, and posting your review or testing of that purpose. Thank you!

See the issue credit guidelines for more information.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs release manager review

So did add

$settings['trusted_host_patterns'] = [];

to my settings and cleared cached and I didn't get an error.

longwave’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed 945c48ff03 to 10.1.x. Thanks!

  • longwave committed 945c48ff on 10.1.x
    Issue #3333281 by MustangGB, smustgrave, xjm: Give trusted host...

Status: Fixed » Closed (fixed)

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