mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-25 02:05:15 +02:00
cookies' generic removing (#676)
Signed-off-by: Denis barbaron <denis.barbaron@orange.com>
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user