Безопасность
Атрибуты безопасности cookie
Почему это важно
Cookies without the Secure, HttpOnly and SameSite flags can be sent over insecure connections, read by injected scripts or attached to cross-site requests. Session cookies are the most sensitive.
Как исправить
- Add Secure so the cookie is only sent over HTTPS.
- Add HttpOnly to every cookie that JavaScript does not need to read.
- Add SameSite=Lax (or Strict) to reduce cross-site request forgery.
Проверить с помощью
- HTTP Headers Checker – View all HTTP response headers for a URL, with notes on the ones that matter for SEO.
- Security Headers Checker – Grade a site’s HTTP security headers (CSP, HSTS, X-Frame-Options and more).
Балл: пройденная проверка получает полный вес, предупреждение — половину, ошибка — ничего. Как рассчитывается SEO-балл