Implement per-domain cookie support for QtWebKit

This commit is contained in:
Florian Bruhin 2020-05-06 21:24:16 +02:00
parent 427d8c092e
commit 4cba2904cd
3 changed files with 7 additions and 2 deletions

View File

@ -1740,6 +1740,9 @@ This setting is only available with the QtWebEngine backend.
[[content.cookies.accept]]
=== content.cookies.accept
Which cookies to accept.
Note that with QtWebKit, only `all` and `never` are supported as per-domain values. Setting `no-3rdparty` or `no-unknown-3rdparty` per-domain on QtWebKit will have the same effect as `all`.
This setting supports URL patterns.
Type: <<types,String>>

View File

@ -56,7 +56,7 @@ class RAMCookieJar(QNetworkCookieJar):
Return:
True if one or more cookies are set for 'url', otherwise False.
"""
if config.val.content.cookies.accept == 'never':
if config.instance.get('content.cookies.accept', url=url) == 'never':
return False
else:
self.changed.emit()

View File

@ -365,7 +365,9 @@ content.cookies.accept:
desc: >-
Which cookies to accept.
Note that this option only supports URL patterns on QtWebEngine.
Note that with QtWebKit, only `all` and `never` are supported as per-domain
values. Setting `no-3rdparty` or `no-unknown-3rdparty` per-domain on
QtWebKit will have the same effect as `all`.
content.cookies.store:
default: true