mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 23:47:23 -06:00
Revise cookie 'secure flag' enable condition
The localhost is 'potentially trustworthy' and RFC 6265 allows setting secure flag in this case. Also check `X-Forwarded-Proto` header value to support reverse proxy usage. Note: for reverse proxy users, now the `X-Forwarded-Proto` header is expected to be sent to qbt otherwise the `secure` flag might be set erroneously. https://datatracker.ietf.org/doc/html/rfc6265#section-4.1.2.5 https://w3c.github.io/webappsec-secure-contexts/#is-origin-trustworthy Closes #21250. PR #21260.
This commit is contained in:
@@ -57,6 +57,7 @@ namespace Http
|
||||
inline const QString HEADER_X_CONTENT_TYPE_OPTIONS = u"x-content-type-options"_s;
|
||||
inline const QString HEADER_X_FORWARDED_FOR = u"x-forwarded-for"_s;
|
||||
inline const QString HEADER_X_FORWARDED_HOST = u"x-forwarded-host"_s;
|
||||
inline const QString HEADER_X_FORWARDED_PROTO = u"X-forwarded-proto"_s;
|
||||
inline const QString HEADER_X_FRAME_OPTIONS = u"x-frame-options"_s;
|
||||
inline const QString HEADER_X_XSS_PROTECTION = u"x-xss-protection"_s;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user