<commit_before>const express = require('express');
const app = express();
const cookieParser = require('cookie-parser');
const bodyParser = require('body-parser');
const session = require('express-session');
const MongoStore = require('connect-mongo')(session);
const config = require('config');
const passport = require('passport');
const localStrategy = require('passport-local').Strategy;
const logger = require('./log.js');
const bcrypt = require('bcryptjs');
const api = require('./api');
const path = require('path');
const jwt = require('jsonwebtoken');
const http = require('http');
const Raven = require('raven');
const helmet = require('helmet');
const webpackDevMiddleware = require('webpack-dev-middleware');
const webpackHotMiddleware = require('webpack-hot-middleware');
const webpack = require('webpack');
const webpackConfig = require('../webpack.config.js');
const monk = require('monk');
const _ = require('underscore');

const UserService = require('./services/UserService.js');
const version = require('../version.js');
const Settings = require('./settings.js');

class Server {
    constructor(isDeveloping) {
        let db = monk(config.dbPath);
        this.userService = new UserService(db);
        this.isDeveloping = isDeveloping;
        this.server = http.Server(app);
    }

    init() {
        if(!this.isDeveloping) {
            Raven.config(config.sentryDsn, { release: version }).install();

            app.use(Raven.requestHandler());
            app.use(Raven.errorHandler());
        }

        app.use(helmet());

        app.set('trust proxy', 1);
        app.use(session({
            store: new MongoStore({ url: config.dbPath }),
            saveUninitialized: false,
            resave: false,
            secret: config.secret,
            cookie: { 
                maxAge: config.cookieLifetime,
                secure: config.https,
                httpOnly: true,
                domain: config.domain
            },
            name: 'sessionId'
            
        }));
<commit_msg>Set httpOnly to false<commit_after>const express = require('express');
const app = express();
const cookieParser = require('cookie-parser');
const bodyParser = require('body-parser');
const session = require('express-session');
const MongoStore = require('connect-mongo')(session);
const config = require('config');
const passport = require('passport');
const localStrategy = require('passport-local').Strategy;
const logger = require('./log.js');
const bcrypt = require('bcryptjs');
const api = require('./api');
const path = require('path');
const jwt = require('jsonwebtoken');
const http = require('http');
const Raven = require('raven');
const helmet = require('helmet');
const webpackDevMiddleware = require('webpack-dev-middleware');
const webpackHotMiddleware = require('webpack-hot-middleware');
const webpack = require('webpack');
const webpackConfig = require('../webpack.config.js');
const monk = require('monk');
const _ = require('underscore');

const UserService = require('./services/UserService.js');
const version = require('../version.js');
const Settings = require('./settings.js');

class Server {
    constructor(isDeveloping) {
        let db = monk(config.dbPath);
        this.userService = new UserService(db);
        this.isDeveloping = isDeveloping;
        this.server = http.Server(app);
    }

    init() {
        if(!this.isDeveloping) {
            Raven.config(config.sentryDsn, { release: version }).install();

            app.use(Raven.requestHandler());
            app.use(Raven.errorHandler());
        }

        app.use(helmet());

        app.set('trust proxy', 1);
        app.use(session({
            store: new MongoStore({ url: config.dbPath }),
            saveUninitialized: false,
            resave: false,
            secret: config.secret,
            cookie: { 
                maxAge: config.cookieLifetime,
                secure: config.https,
                httpOnly: false,
                domain: config.domain
            },
            name: 'sessionId'
            
        }));

{'fraction_non_alphanumeric': 0.147930443301494, 'fraction_numerical': 0.0004898359049718344, 'mean_word_length': 2.9497098646034816, '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': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7173362', 'n_tokens_mistral': 1121, 'n_tokens_neox': 1084, 'n_words': 253}