<commit_before>/**
 * @file
 * @author zdying
 */
'use strict';

var request = require('./request');
var alias = require('./alias');

module.exports = function (ctx, next) {
  var proxyInfo = ctx.proxy;
  var req = ctx.req;
  var res = ctx.res;
  var isAlias = proxyInfo.alias;
  var handler = isAlias ? alias : request;
  var hiproxy = this;
  var options = hiproxy.options;
  var onBeforeRequest = options.onBeforeRequest;

  if (typeof onBeforeRequest === 'function') {
    // TODO 确定这个回掉函数的参数
    onBeforeRequest({
      req: req,
      res: res,<commit_msg>Add todo remark<commit_after>/**
 * @file
 * @author zdying
 */
'use strict';

var request = require('./request');
var alias = require('./alias');

module.exports = function (ctx, next) {
  var proxyInfo = ctx.proxy;
  var req = ctx.req;
  var res = ctx.res;
  var isAlias = proxyInfo.alias;
  var handler = isAlias ? alias : request;
  var hiproxy = this;
  var options = hiproxy.options;
  var onBeforeRequest = options.onBeforeRequest;

  if (typeof onBeforeRequest === 'function') {
    // TODO 确定这个回掉函数的参数
    // TODO 各个插件也需要能修改？也就是说`onBeforeRequest`应该是个数组。
    onBeforeRequest({
      req: req,
      res: res,
{'fraction_non_alphanumeric': 0.13582342954159593, 'fraction_numerical': 0.0, 'mean_word_length': 3.302919708029197, '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': '6325704', 'n_tokens_mistral': 411, 'n_tokens_neox': 419, 'n_words': 109}