1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-24 21:44:25 +00:00

Avoid modifing request headers

This commit is contained in:
Chocobo1 2017-07-02 20:44:56 +08:00 committed by sledgehammer999
parent 23616d5dd0
commit 55e038b165
No known key found for this signature in database
GPG Key ID: 6E4A2D025B7CC9A2

View File

@ -387,7 +387,7 @@ bool AbstractWebApplication::isCrossSiteRequest(const Http::Request &request) co
&& (left.host() == right.host()));
};
const QString targetOrigin = request.headers.value(Http::HEADER_X_FORWARDED_HOST, request.headers[Http::HEADER_HOST]);
const QString targetOrigin = request.headers.value(Http::HEADER_X_FORWARDED_HOST, request.headers.value(Http::HEADER_HOST));
const QString originValue = request.headers.value(Http::HEADER_ORIGIN);
const QString refererValue = request.headers.value(Http::HEADER_REFERER);