<commit_before>'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.destroy();
        }
        if (req.logout) {
            req.logout();
        }
        res.set('Clear-Site-Data', '*');
        res.redirect(`${this.config.baseUriPath}/`);
    }
}

module.exports = HealthCheckController;<commit_msg>fix: Clear-Site-Data header needs to be double quoted<commit_after>'use strict';

const Controller = require('./controller');

class LogoutController extends Controller {
    constructor(config) {
        super(config);
        this.get('/', this.logout);
    }

    logout(req, res) {
        if (req.session) {
            req.session.destroy();
        }
        if (req.logout) {
            req.logout();
        }
        res.set('Clear-Site-Data', '"cookies"');
        res.redirect(`${this.config.baseUriPath}/`);
    }
}

module.exports = LogoutController;
{'fraction_non_alphanumeric': 0.15567765567765568, 'fraction_numerical': 0.0, 'mean_word_length': 2.2529761904761907, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7453547', 'n_tokens_mistral': 323, 'n_tokens_neox': 320, 'n_words': 57}