mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-14 01:03:08 -07:00
Enforce referrer-policy in WebUI
This stops leaking private data to other websites via Referrer header.
This commit is contained in:
parent
e1f19b7c75
commit
7fd30fa90f
2 changed files with 4 additions and 1 deletions
|
@ -570,9 +570,11 @@ Http::Response WebApplication::processRequest(const Http::Request &request, cons
|
|||
if (m_isHttpsEnabled) {
|
||||
csp += QLatin1String(" upgrade-insecure-requests;");
|
||||
}
|
||||
|
||||
header(Http::HEADER_CONTENT_SECURITY_POLICY, csp);
|
||||
|
||||
if (!m_isAltUIUsed)
|
||||
header(Http::HEADER_REFERRER_POLICY, "same-origin");
|
||||
|
||||
return response();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue