snipe-it/app/Http/Middleware/XssProtectHeader.php

23 lines
497 B
PHP
Raw Normal View History

2016-03-25 01:18:05 -07:00
<?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';
2016-03-25 01:18:05 -07:00
$response = $next($request);
2017-09-28 16:28:27 -07:00
$response->headers->set('X-XSS-Protection', $mode);
2016-03-25 01:18:05 -07:00
return $response;
}
}