Skip to content

Commit

Permalink
Update src/http/cookie.cr
Browse files Browse the repository at this point in the history
  • Loading branch information
straight-shoota authored Nov 12, 2024
1 parent c592330 commit b2f526b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/http/cookie.cr
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,8 @@ module HTTP
end
end

# tell the browser to delete the cookie.
# Set its value to an empty string
# and set its expiration time to the past
# Browsers delete cookies that have expired.
# Destroys the cookie.
# This is done by causing the cookie to expire. Also clears its value.
def destroy
self.value = ""
self.expires = Time::UNIX_EPOCH
Expand Down

0 comments on commit b2f526b

Please sign in to comment.