mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-20 04:24:23 -08:00
23 lines
497 B
PHP
23 lines
497 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)
|
|
{
|
|
$mode = '1;mode=block';
|
|
$response = $next($request);
|
|
$response->headers->set('X-XSS-Protection', $mode);
|
|
return $response;
|
|
}
|
|
}
|