cookies' generic removing (#676)

Signed-off-by: Denis barbaron <denis.barbaron@orange.com>
This commit is contained in:
Denis Barbaron
2023-06-16 17:43:20 +02:00
committed by GitHub
parent 3e526d2aa3
commit 620be9ba21

View File

@@ -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(
@@ -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()