mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 15:07:22 -06:00
[WebUI]: add X-XSS-Protection, X-Content-Type-Options, CSP header
This commit is contained in:
committed by
sledgehammer999
parent
f5ad04766f
commit
7756dd80f3
@@ -108,6 +108,9 @@ Http::Response AbstractWebApplication::processRequest(const Http::Request &reque
|
||||
|
||||
// avoid clickjacking attacks
|
||||
header(Http::HEADER_X_FRAME_OPTIONS, "SAMEORIGIN");
|
||||
header(Http::HEADER_X_XSS_PROTECTION, "1; mode=block");
|
||||
header(Http::HEADER_X_CONTENT_TYPE_OPTIONS, "nosniff");
|
||||
header(Http::HEADER_CONTENT_SECURITY_POLICY, "default-src 'self' 'unsafe-inline' 'unsafe-eval';");
|
||||
|
||||
sessionInitialize();
|
||||
if (!sessionActive() && !isAuthNeeded())
|
||||
|
||||
Reference in New Issue
Block a user