<commit_before>/**
 * Module dependencies.
 */

var config = require('lib/config');
var hidden = config('visibility') == 'hidden';

// app.all('/api/*', function isPrivate(req, res, next) {
//   if (!config('private app')) return next();
//   if (req.user) return next();

//   res.status(403).send();
// });


module.exports = function middleware(req, res, next) {
  console.log('vis');
  if (req.user) return next();
  if (!hidden) return next();

  console.log('redirecting');<commit_msg>[visibility] Removed console.log calls #733<commit_after>/**
 * Module dependencies.
 */

var config = require('lib/config');
var hidden = config('visibility') == 'hidden';

// app.all('/api/*', function isPrivate(req, res, next) {
//   if (!config('private app')) return next();
//   if (req.user) return next();

//   res.status(403).send();
// });


module.exports = function middleware(req, res, next) {
  if (req.user) return next();
  if (!hidden) return next();

{'fraction_non_alphanumeric': 0.21458333333333332, 'fraction_numerical': 0.009375, 'mean_word_length': 3.9030612244897958, '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': '2451192', 'n_tokens_mistral': 315, 'n_tokens_neox': 302, 'n_words': 81}