<commit_before>worker_processes {{nginx.workers}};

daemon off;

{{#if user}}
user {{user}} {{group}};
{{/if}}

pid {{run_dir}}/router-nginx.pid;

events {
  worker_connections {{nginx.worker_connections}};
}

error_log stderr;

http {
  error_log {{log_dir}}/router-error.log;
  access_log {{log_dir}}/router-access.log combined buffer=32k flush=10s;

  client_body_temp_path {{tmp_dir}}/router-nginx-client_body_temp;
  proxy_temp_path {{tmp_dir}}/router-nginx-proxy_temp;
  fastcgi_temp_path {{tmp_dir}}/router-nginx-fastcgi_temp;
  uwsgi_temp_path {{tmp_dir}}/router-nginx-uwsgi_temp;
  scgi_temp_path {{tmp_dir}}/router-nginx-scgi_temp;
  server_tokens off;

  # Log format for gathering the primary analytics.
  #
  # Note: This is manually constructed JSON to make dealing with it more sane
  # than a bunch of unnamed columns. nginx will escape quotes in values, so
  # this is safe, but you have to do manually deal with those escape sequences
  # before you can actually parse as JSON. See router_log_listener's handling
  # for more details.
  log_format api_umbrella_initial_router_log '{'
    '"id":"$x_api_umbrella_request_id",'
    '"source":"$router_name",'
    '"req_accept":"$http_accept",'
    '"req_accept_encoding":"$http_accept_encoding",'
    '"req_api_key_header":"$http_x_api_key",'
    '"req_api_key_query":"$arg_api_key",'
    '"req_at_msec":"$msec",'
    '"req_basic_auth_username":"$remote_user",'
    '"req_connection":"$http_connection",'
    '"req_content_type":"$http_content_type",'
    '"req_host":"$http_host",'
    '"req_host1":"$host",'
    '"req_host2":"$hostname",'
    '"req_ip":"$remote_addr",'
    '"req_method":"$request_method",'
    '"req_origin":"$http_origin",'
    '"req_port":"$server_port",'
    '"req_referer":"$http_referer",'
    '"req_scheme":"$scheme",'
    '"req_size":"$request_length",'
    '"req_uri":"$request_uri",'
    '"req_user_agent":"$http_user_agent",'<commit_msg>Remove multiple host headers from log file.<commit_after>worker_processes {{nginx.workers}};

daemon off;

{{#if user}}
user {{user}} {{group}};
{{/if}}

pid {{run_dir}}/router-nginx.pid;

events {
  worker_connections {{nginx.worker_connections}};
}

error_log stderr;

http {
  error_log {{log_dir}}/router-error.log;
  access_log {{log_dir}}/router-access.log combined buffer=32k flush=10s;

  client_body_temp_path {{tmp_dir}}/router-nginx-client_body_temp;
  proxy_temp_path {{tmp_dir}}/router-nginx-proxy_temp;
  fastcgi_temp_path {{tmp_dir}}/router-nginx-fastcgi_temp;
  uwsgi_temp_path {{tmp_dir}}/router-nginx-uwsgi_temp;
  scgi_temp_path {{tmp_dir}}/router-nginx-scgi_temp;
  server_tokens off;

  # Log format for gathering the primary analytics.
  #
  # Note: This is manually constructed JSON to make dealing with it more sane
  # than a bunch of unnamed columns. nginx will escape quotes in values, so
  # this is safe, but you have to do manually deal with those escape sequences
  # before you can actually parse as JSON. See router_log_listener's handling
  # for more details.
  log_format api_umbrella_initial_router_log '{'
    '"id":"$x_api_umbrella_request_id",'
    '"source":"$router_name",'
    '"req_accept":"$http_accept",'
    '"req_accept_encoding":"$http_accept_encoding",'
    '"req_api_key_header":"$http_x_api_key",'
    '"req_api_key_query":"$arg_api_key",'
    '"req_at_msec":"$msec",'
    '"req_basic_auth_username":"$remote_user",'
    '"req_connection":"$http_connection",'
    '"req_content_type":"$http_content_type",'
    '"req_host":"$http_host",'
    '"req_ip":"$remote_addr",'
    '"req_method":"$request_method",'
    '"req_origin":"$http_origin",'
    '"req_port":"$server_port",'
    '"req_referer":"$http_referer",'
    '"req_scheme":"$scheme",'
    '"req_size":"$request_length",'
    '"req_uri":"$request_uri",'
    '"req_user_agent":"$http_user_agent",'
{'fraction_non_alphanumeric': 0.16345151199165797, 'fraction_numerical': 0.0026068821689259644, 'mean_word_length': 5.592783505154639, 'pattern_counts': {'":': 42, '<': 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': '1669791', 'n_tokens_mistral': 1403, 'n_tokens_neox': 1367, 'n_words': 245}