mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Add security options to add X-Frame-Options and X-Content-Type-Options headers
- 보안 관련하여 널리 알려진 헤더 3종 가운데 2종을 기본 지원 - X-XSS-Protection 헤더는 IE 지원 종료로 불필요
This commit is contained in:
parent
e3ce2bcbcc
commit
5ba6346bec
6 changed files with 66 additions and 15 deletions
|
|
@ -115,6 +115,16 @@ class DisplayHandler extends Handler
|
|||
}
|
||||
}
|
||||
|
||||
// Print security-related headers.
|
||||
if($header_value = config('security.x_frame_options'))
|
||||
{
|
||||
header('X-Frame-Options: ' . $header_value);
|
||||
}
|
||||
if($header_value = config('security.x_content_type_options'))
|
||||
{
|
||||
header('X-Content-Type-Options: ' . $header_value);
|
||||
}
|
||||
|
||||
// flush output buffer
|
||||
while (ob_get_level())
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue