FrameGuard.php 499B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace Illuminate\Http\Middleware;
  3. use Closure;
  4. class FrameGuard
  5. {
  6. /**
  7. * Handle the given request and get the response.
  8. *
  9. * @param \Illuminate\Http\Request $request
  10. * @param \Closure $next
  11. * @return \Symfony\Component\HttpFoundation\Response
  12. */
  13. public function handle($request, Closure $next)
  14. {
  15. $response = $next($request);
  16. $response->headers->set('X-Frame-Options', 'SAMEORIGIN', false);
  17. return $response;
  18. }
  19. }