Skip to content

Commit

Permalink
Merge pull request #1 from daniel-kao/modify_ios_httponly_cookie_flag
Browse files Browse the repository at this point in the history
make sure httpOnly won't appear if value is not set
  • Loading branch information
plateaukao authored and GitHub Enterprise committed Apr 30, 2020
2 parents c1416dc + 9ad9948 commit 6debfe6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ios/Classes/MyCookieManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,11 @@ class MyCookieManager: NSObject, FlutterPlugin {
properties[.maximumAge] = String(maxAge!)
}
properties[.secure] = (isSecure != nil && isSecure!) ? "TRUE" : "FALSE"

properties[.httpOnly] = (isHttpOnly != nil && isHttpOnly!) ? "TRUE" : "FALSE"


if isHttpOnly == true {
properties[.httpOnly] = true
}

if #available(iOS 13, *) {
if sameSite != nil {
properties[.sameSitePolicy] = sameSite!
Expand Down

0 comments on commit 6debfe6

Please sign in to comment.