Skip to content

Commit ac733b6

Browse files
ivercfryette
andauthored
Fix domain check (fryette#31)
* Fix getCookies domain/host match checker * Update (fryette#2) * Update README.md * Fix getCookies domain/host match checker (fryette#29) * Update README.md * bump version Co-authored-by: Eugeny Sampir <ysampir@gmail.com> * Fix domain check Co-authored-by: Eugeny Sampir <ysampir@gmail.com>
1 parent bdd64ea commit ac733b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ios/Classes/SwiftWebviewCookieManagerPlugin.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public class SwiftWebviewCookieManagerPlugin: NSObject, FlutterPlugin {
110110
func matches(cookie: HTTPCookie) -> Bool {
111111
// nil host means unparseable url or empty string
112112
let containsHost = host.map{cookie.domain.contains($0)} ?? false
113-
let containsDomain = cookie.domain.map{host.contains($0)} ?? false
113+
let containsDomain = host?.contains(cookie.domain) ?? false
114114
return url == "" || containsHost || containsDomain
115115
}
116116

0 commit comments

Comments
 (0)