<commit_before>/**
 * CORS Middleware
 *
 * Allows cross-origin requests and supports the pre-flight
 * OPTIONS requests
 */

module.exports = function(req, res, next) {
  res.header('Access-Control-Allow-Origin', '*');
  res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE');
  res.header('Access-Control-Allow-Headers', 'Content-Type, Authorization');

  // intercept OPTIONS method
  if ('OPTIONS' == req.method) {
    res.send(200);
  }
  else {
    next();
  }
};<commit_msg>fix setting headers<commit_after>/**
 * CORS Middleware
 *
 * Allows cross-origin requests and supports the pre-flight
 * OPTIONS requests
 */

module.exports = function(req, res, next) {
  res.set('Access-Control-Allow-Origin', '*');
  res.set('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE');
  res.set('Access-Control-Allow-Headers', 'Content-Type, Authorization');

  // intercept OPTIONS method
  if ('OPTIONS' == req.method) {
    res.send(200);
  }
  else {
    next();
  }
};
{'fraction_non_alphanumeric': 0.17329255861365953, 'fraction_numerical': 0.0061162079510703364, 'mean_word_length': 3.9346733668341707, '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': '4701823', 'n_tokens_mistral': 335, 'n_tokens_neox': 318, 'n_words': 64}