<commit_before>/* jshint node: true */
/* jshint esnext: true */
'use strict';

let express = require('express');
let path = require('path');
let favicon = require('static-favicon');
let logger = require('morgan');
let cookieParser = require('cookie-parser');
let bodyParser = require('body-parser');
let passport = require('passport');
let LocalStrategy = require('passport-local').Strategy;
let flash = require('connect-flash');

let indexRoute = require('./routes/index');
let loginRoute = require('./routes/login');
let logoutRoute = require('./routes/logout');

let registrationRoute = require('./routes/participants/registration');
let participantsRoute = require('./routes/participants/participants');
let editParticipantRoute = require('./routes/participants/editParticipant');

let adminRoute = require('./routes/admin/admin');
let adminParticipantsRoute = require('./routes/admin/participants');
let adminEditParticipantRoute = require('./routes/admin/editParticipant');
let paymentValidationRoute = require('./routes/admin/paymentValidation');

let config = require('config');
let csrf = require('csurf');

let app = express();

app.locals.node_env = process.env.NODE_ENV;
// view engine setup
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'jade');

app.disable("x-powered-by");
app.set('trust proxy',config.get('proxy'));

app.use(favicon());
app.use(logger('dev'));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded());
app.use(cookieParser());
app.use(express.static(path.join(__dirname, 'public')));

// authentication using passport needs to be initialized before the routing setup
app.use(require('express-session')(
    {
        secret: config.get('cookie-secret'),
        signed: true,<commit_msg>We now log only HTTP res > 400<commit_after>/* jshint node: true */
/* jshint esnext: true */
'use strict';

let express = require('express');
let path = require('path');
let favicon = require('static-favicon');
let logger = require('morgan');
let cookieParser = require('cookie-parser');
let bodyParser = require('body-parser');
let passport = require('passport');
let LocalStrategy = require('passport-local').Strategy;
let flash = require('connect-flash');

let indexRoute = require('./routes/index');
let loginRoute = require('./routes/login');
let logoutRoute = require('./routes/logout');

let registrationRoute = require('./routes/participants/registration');
let participantsRoute = require('./routes/participants/participants');
let editParticipantRoute = require('./routes/participants/editParticipant');

let adminRoute = require('./routes/admin/admin');
let adminParticipantsRoute = require('./routes/admin/participants');
let adminEditParticipantRoute = require('./routes/admin/editParticipant');
let paymentValidationRoute = require('./routes/admin/paymentValidation');

let config = require('config');
let csrf = require('csurf');

let app = express();

app.locals.node_env = process.env.NODE_ENV;
// view engine setup
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'jade');

app.disable("x-powered-by");
app.set('trust proxy',config.get('proxy'));

app.use(favicon());
app.use(logger('tiny', {
  skip: (req, res) => { return res.statusCode < 400;}
}));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded());
app.use(cookieParser());
app.use(express.static(path.join(__dirname, 'public')));

// authentication using passport needs to be initialized before the routing setup
app.use(require('express-session')(
    {
        secret: config.get('cookie-secret'),
        signed: true,
{'fraction_non_alphanumeric': 0.1756492599832449, 'fraction_numerical': 0.0016755096341803965, 'mean_word_length': 5.941860465116279, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 5, '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': '6006387', 'n_tokens_mistral': 1049, 'n_tokens_neox': 1028, 'n_words': 235}