Skip to content

Conversation

@axlon
Copy link
Contributor

@axlon axlon commented Oct 21, 2021

Redo of #39293.

This PR removes the TrustHosts middleware's reliance on the config() helper, this achieves two things:

  • Developers can now unit test their application's implementation more easily, because they can simply mock the application instance this middleware receives through it's constructor
  • If a developer were to extend Illuminate\Contracts\Foundation\Application::environment() for some reason, the middleware would now take that into account

@taylorotwell taylorotwell merged commit a3e7f48 into laravel:master Oct 21, 2021
@axlon axlon deleted the patch-2 branch October 21, 2021 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants