mirror of
https://github.com/Unleash/unleash.git
synced 2024-12-28 00:06:53 +01:00
23 lines
457 B
JavaScript
23 lines
457 B
JavaScript
|
'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();
|
||
|
}
|
||
|
res.redirect(`${this.config.baseUriPath}/`);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
module.exports = HealthCheckController;
|