From 9aa50ca6e315db99fa6fcf2b392fa3f42a98971d Mon Sep 17 00:00:00 2001 From: Matt Kilgore Date: Thu, 29 Apr 2021 18:30:01 -0400 Subject: [PATCH] Move Powered By Header to headers config (#2777) * Move Powered By Header to headers config * Use Arr::get() --- framework/core/src/Http/Middleware/FlarumPromotionHeader.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/framework/core/src/Http/Middleware/FlarumPromotionHeader.php b/framework/core/src/Http/Middleware/FlarumPromotionHeader.php index 5e809fd0a..773741434 100644 --- a/framework/core/src/Http/Middleware/FlarumPromotionHeader.php +++ b/framework/core/src/Http/Middleware/FlarumPromotionHeader.php @@ -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