mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 06:28:03 -06:00
Enforce referrer-policy in WebUI
This stops leaking private data to other websites via Referrer header.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user