iOS CookieManager.getCookies - Check that URL has suffix of cookie domain
This commit is contained in:
parent
eaad17eb4f
commit
44482c123f
|
@ -146,7 +146,7 @@ class MyCookieManager: NSObject, FlutterPlugin {
|
||||||
if let urlHost = URL(string: url)?.host {
|
if let urlHost = URL(string: url)?.host {
|
||||||
MyCookieManager.httpCookieStore!.getAllCookies { (cookies) in
|
MyCookieManager.httpCookieStore!.getAllCookies { (cookies) in
|
||||||
for cookie in cookies {
|
for cookie in cookies {
|
||||||
if cookie.domain.contains(urlHost) {
|
if urlHost.hasSuffix(cookie.domain) {
|
||||||
var sameSite: String? = nil
|
var sameSite: String? = nil
|
||||||
if #available(iOS 13.0, *) {
|
if #available(iOS 13.0, *) {
|
||||||
if let sameSiteValue = cookie.sameSitePolicy?.rawValue {
|
if let sameSiteValue = cookie.sameSitePolicy?.rawValue {
|
||||||
|
|
Loading…
Reference in New Issue