1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
unleash.unleash/lib/routes/logout.js

24 lines
498 B
JavaScript
Raw Normal View History

'use strict';
const Controller = require('./controller');
class HealthCheckController extends Controller {
constructor(config) {
super(config);
this.get('/', this.logout);
}
logout(req, res) {
if (req.session) {
req.session = null;
}
if (req.logout) {
req.logout();
}
2020-10-01 21:57:33 +02:00
res.set('Clear-Site-Data', '*');
res.redirect(`${this.config.baseUriPath}/`);
}
}
module.exports = HealthCheckController;