mirror of
https://github.com/sinatra/sinatra
synced 2023-03-27 23:18:01 -04:00
Remove extra calls to method that determines cookie paths
This commit is contained in:
parent
cd5028b5c9
commit
00027380ce
1 changed files with 3 additions and 1 deletions
|
@ -39,8 +39,10 @@ module Rack
|
|||
end
|
||||
|
||||
def remove_bad_cookies(request, response)
|
||||
return if bad_cookies.empty?
|
||||
paths = cookie_paths(request.path)
|
||||
bad_cookies.each do |name|
|
||||
cookie_paths(request.path).each { |path| response.set_cookie name, empty_cookie(request.host, path) }
|
||||
paths.each { |path| response.set_cookie name, empty_cookie(request.host, path) }
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue