Permalink
Browse files

Allows to specify a domain when deleting a cookie.

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 24b7c5c91d2e896e3b14f480bb195f40b4361641
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/wsapi/response.lua
View
@@ -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)

0 comments on commit 24b7c5c

Please sign in to comment.