fix cookie .secure property
This commit is contained in:
parent
7d9f9f56a4
commit
fcb965eac6
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue