Skip to content

Commit

Permalink
Allows to specify a domain when deleting a cookie.
Browse files Browse the repository at this point in the history
When a cookie has been set with a given domain (i.e. domain="example.com"), subsequent attempts to delete it will be ignored by the browser if the same domain is not provided.

So a 'domain' parameter is added to the 'delete_cookie' method in order to be able to delete those cookies.
  • Loading branch information
ignacio committed Jan 28, 2014
1 parent fc5751b commit 24b7c5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/wsapi/response.lua
Expand Up @@ -87,8 +87,8 @@ function methods:set_cookie(name, value)
end
end

function methods:delete_cookie(name, path)
self:set_cookie(name, { value = "xxx", expires = 1, path = path })
function methods:delete_cookie(name, path, domain)
self:set_cookie(name, { value = "xxx", expires = 1, path = path, domain = domain })
end

function methods:redirect(url)
Expand Down

0 comments on commit 24b7c5c

Please sign in to comment.