Skip to content

Commit

Permalink
fix(iOS): fix 'secure' and 'httpOnly' values always being false (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
abendi committed Aug 26, 2021
1 parent 0b99c33 commit 354e9bb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ios/RNCookieManagerIOS/RNCookieManagerIOS.m
Original file line number Diff line number Diff line change
Expand Up @@ -313,11 +313,11 @@ -(NSHTTPCookie *)makeHTTPCookieObject:(NSURL *)url
if (!isEmpty(expires)) {
[cookieProperties setObject:expires forKey:NSHTTPCookieExpires];
}
if (!isEmpty(secure)) {
[cookieProperties setObject:secure forKey:@"secure"];
if ([secure boolValue]) {
[cookieProperties setObject:secure forKey:NSHTTPCookieSecure];
}
if (!isEmpty(httpOnly)) {
[cookieProperties setObject:httpOnly forKey:@"HTTPOnly"];
if ([httpOnly boolValue]) {
[cookieProperties setObject:httpOnly forKey:@"HttpOnly"];
}

NSHTTPCookie *cookie = [NSHTTPCookie cookieWithProperties:cookieProperties];
Expand Down

0 comments on commit 354e9bb

Please sign in to comment.