Skip security headers middleware when testing
This commit is contained in:
parent
9a0c66bd30
commit
0cefc7de15
1 changed files with 5 additions and 0 deletions
|
@ -3,6 +3,7 @@
|
||||||
namespace App\Http\Middleware;
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
use Closure;
|
use Closure;
|
||||||
|
use Illuminate\Support\Facades\App;
|
||||||
|
|
||||||
class SecurityHeaders
|
class SecurityHeaders
|
||||||
{
|
{
|
||||||
|
@ -22,6 +23,10 @@ class SecurityHeaders
|
||||||
|
|
||||||
public function handle($request, Closure $next)
|
public function handle($request, Closure $next)
|
||||||
{
|
{
|
||||||
|
if (App::environment(['testing', 'testing-ci'])) {
|
||||||
|
return $next($request);
|
||||||
|
}
|
||||||
|
|
||||||
$this->removeUnwantedHeaders($this->unwantedHeaderList);
|
$this->removeUnwantedHeaders($this->unwantedHeaderList);
|
||||||
$response = $next($request);
|
$response = $next($request);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue