Skip to content

Commit

Permalink
cookies' generic removing (#676)
Browse files Browse the repository at this point in the history
Signed-off-by: Denis barbaron <[email protected]>
  • Loading branch information
denis99999 authored Jun 16, 2023
1 parent 3e526d2 commit 620be9b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions res/app/menu/menu-controller.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright © 2019 contains code contributed by Orange SA, authors: Denis Barbaron - Licensed under the Apache license 2.0
* Copyright © 2019-2023 contains code contributed by Orange SA, authors: Denis Barbaron - Licensed under the Apache license 2.0
**/

module.exports = function MenuCtrl(
Expand Down Expand Up @@ -37,9 +37,12 @@ module.exports = function MenuCtrl(
})

$scope.logout = function() {
$cookies.remove('XSRF-TOKEN', {path: '/'})
$cookies.remove('ssid', {path: '/'})
$cookies.remove('ssid.sig', {path: '/'})
const cookies = $cookies.getAll()
for (const key in cookies) {
if (cookies.hasOwnProperty(key)) {
$cookies.remove(key, {path: '/'})
}
}
$window.location = '/'
setTimeout(function() {
socket.disconnect()
Expand Down

0 comments on commit 620be9b

Please sign in to comment.