diff --git a/ios/Classes/MyCookieManager.swift b/ios/Classes/MyCookieManager.swift index 917ee1a49..8f20ec948 100755 --- a/ios/Classes/MyCookieManager.swift +++ b/ios/Classes/MyCookieManager.swift @@ -146,7 +146,7 @@ class MyCookieManager: NSObject, FlutterPlugin { if let urlHost = URL(string: url)?.host { MyCookieManager.httpCookieStore!.getAllCookies { (cookies) in for cookie in cookies { - if cookie.domain.contains(urlHost) { + if urlHost.hasSuffix(cookie.domain) { var sameSite: String? = nil if #available(iOS 13.0, *) { if let sameSiteValue = cookie.sameSitePolicy?.rawValue {