← PHP / Laravel 목차

PHP-085 / 기초

클릭재킹: 프레임 허용

A05:2021 Security Misconfiguration · CWE-1021 Improper Restriction of Rendered UI Layers

왜 문제가 될까요?

투명 iframe 위에서 사용자가 버튼을 누르게 한다.

이렇게 수정하세요

php
$response->headers->set('X-Frame-Options', 'DENY');
$response->headers->set('Content-Security-Policy', "frame-ancestors 'none'");

더 읽기