Commit c65ee346 authored by Lorenzo Pichilli's avatar Lorenzo Pichilli Committed by GitHub

Merge pull request #658 from getkickback/ios-cookie-domain

iOS CookieManager.getCookies - Check that URL has suffix of cookie do…
parents c65e72c7 44482c12
...@@ -146,7 +146,7 @@ class MyCookieManager: NSObject, FlutterPlugin { ...@@ -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 {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment