mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-26 05:01:06 -08:00
Skip security headers middleware when testing
This commit is contained in:
parent
9a0c66bd30
commit
0cefc7de15
|
@ -3,6 +3,7 @@
|
|||
namespace App\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Support\Facades\App;
|
||||
|
||||
class SecurityHeaders
|
||||
{
|
||||
|
@ -22,6 +23,10 @@ class SecurityHeaders
|
|||
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
if (App::environment(['testing', 'testing-ci'])) {
|
||||
return $next($request);
|
||||
}
|
||||
|
||||
$this->removeUnwantedHeaders($this->unwantedHeaderList);
|
||||
$response = $next($request);
|
||||
|
||||
|
|
Loading…
Reference in a new issue