mirror of
https://github.com/flarum/framework.git
synced 2024-11-29 12:43:52 +08:00
Move Powered By Header to headers config (#2777)
* Move Powered By Header to headers config * Use Arr::get()
This commit is contained in:
parent
56a02944f1
commit
9aa50ca6e3
|
@ -10,6 +10,7 @@
|
|||
namespace Flarum\Http\Middleware;
|
||||
|
||||
use Flarum\Foundation\Config;
|
||||
use Illuminate\Support\Arr;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use Psr\Http\Server\MiddlewareInterface as Middleware;
|
||||
|
@ -21,7 +22,7 @@ class FlarumPromotionHeader implements Middleware
|
|||
|
||||
public function __construct(Config $config)
|
||||
{
|
||||
$this->enabled = $config['poweredByHeader'] ?? true;
|
||||
$this->enabled = Arr::get($config, 'headers.poweredByHeader') ?? true;
|
||||
}
|
||||
|
||||
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
|
||||
|
|
Loading…
Reference in New Issue
Block a user