mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-10 07:34:06 -08:00
22 lines
463 B
PHP
22 lines
463 B
PHP
|
<?php
|
||
|
namespace App\Http\Middleware;
|
||
|
|
||
|
use Closure;
|
||
|
|
||
|
class XssProtectHeader
|
||
|
{
|
||
|
/**
|
||
|
* Handle the given request and get the response.
|
||
|
*
|
||
|
* @param \Illuminate\Http\Request $request
|
||
|
* @param \Closure $next
|
||
|
* @return \Illuminate\Http\Response
|
||
|
*/
|
||
|
public function handle($request, Closure $next)
|
||
|
{
|
||
|
$response = $next($request);
|
||
|
$response->headers->set('X-XSS-Protection', '1');
|
||
|
return $response;
|
||
|
}
|
||
|
}
|