Commit fcb965ea authored by xuty's avatar xuty

fix cookie .secure property

parent 7d9f9f56
...@@ -90,7 +90,9 @@ class MyCookieManager: NSObject, FlutterPlugin { ...@@ -90,7 +90,9 @@ class MyCookieManager: NSObject, FlutterPlugin {
if maxAge != nil { if maxAge != nil {
properties[.maximumAge] = String(maxAge!) properties[.maximumAge] = String(maxAge!)
} }
properties[.secure] = (isSecure != nil && isSecure!) ? "TRUE" : "FALSE" if isSecure != nil && isSecure! {
properties[.secure] = "TRUE"
}
let cookie = HTTPCookie(properties: properties)! let cookie = HTTPCookie(properties: properties)!
MyCookieManager.httpCookieStore!.setCookie(cookie, completionHandler: {() in MyCookieManager.httpCookieStore!.setCookie(cookie, completionHandler: {() in
......
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