FIX: Content Security Policy

This commit is contained in:
Evg 2021-05-24 09:03:20 +03:00
parent c11f55d376
commit 25c915933f
3 changed files with 13 additions and 38 deletions

View file

@ -49,7 +49,7 @@ h1.space a {
.yes-space {
background: #f4d85d;
color: #333;
}
}
.space-tags .menu-m {
margin: 0 0 5px 0;

View file

@ -9,8 +9,8 @@ body {
padding: 0;
}
*,
::after,
*,
::after,
::before {
box-sizing: border-box;
}
@ -70,7 +70,6 @@ aside {
header {
z-index: 10;
margin: 0 0 12px 0;
/* border-bottom: 1px solid #e6ecf0; */
padding: 5px 5px 12px 5px;
}
@ -99,7 +98,6 @@ main.w-50 {
max-width: 700px;
}
a.add-post {
background: #1ca1f3;
border:1px solid #1ca1f3;
@ -154,14 +152,14 @@ a.add-post {
}
.nick span {
font-size: 13px;
margin-right: 5px;
font-size: 13px;
margin-right: 5px;
}
a.add-post:hover {
background: #fff;
color: #1ca1f3;
}
}
a.link {
font-size: 13px;
@ -356,7 +354,7 @@ a.register {
}
.post-body i.icon {
margin-left: 8px;
margin-left: 8px;
}
.mlogout {
@ -548,13 +546,13 @@ input.form-search {
}
input.form-search:hover {
border: 1px solid #e6ecf0;
background-color: #fff;
border: 1px solid #e6ecf0;
background-color: #fff;
}
input.form-search:focus {
border: 1px solid #1ca1f3;
background-color: #fff;
border: 1px solid #1ca1f3;
background-color: #fff;
}
/* Sidebar */
@ -689,29 +687,6 @@ aside a.my.active {
background-color: lightyellow;
}
.fon {
position: absolute;
top: 37px;
right: 0;
}
.msg_error,
.msg_success {
padding: 8px 18px;
font-size: 14px;
margin-bottom: 12px;
}
.msg_error {
background: #f3f3f3;
color: #e7672e;
}
.msg_success {
background: #fcf8e4;
color: green;
}
.notif-color-1 {
background: #f89406;
}
@ -893,7 +868,7 @@ img.thumb {
color: var(--color-gray-2);
}
.footer .ava,
.footer .ava,
.mini.ava {
border-radius: 50%;
height: 16px;

View file

@ -13,7 +13,7 @@ define('HLEB_PUBLIC_DIR', __DIR__);
// Общие заголовки.
// Content Security Policy
$_SERVER['nonce'] = bin2hex(random_bytes('12'));
header("Content-Security-Policy: default-src 'self' https://www.google.com https://www.gstatic.com; img-src 'self' blob:; object-src 'none'; style-src 'self' 'nonce-".$_SERVER['nonce']."'");
header("Content-Security-Policy: default-src 'self' https://www.google.com https://www.gstatic.com; script-src 'self' 'nonce-".$_SERVER['nonce']."'; img-src 'self' blob:; object-src 'none'; style-src 'self' 'nonce-".$_SERVER['nonce']."'");
header("Strict-Transport-Security: max-age=31536000; includeSubDomains; preload;");
header("Referrer-Policy: no-referrer-when-downgrade");
header("X-XSS-Protection: 1; mode=block");