<commit_before>server {
  listen       <%= @port %>;

  <% if @dev %>
  server_name localhost;
  <% else %>
  server_name questhub.io;
  <% end %>

  <% if @dev %>
  # Turn sendfile off because it behaves bad with vboxsf
  sendfile off;
  <% end %>

  gzip             on;
  gzip_min_length  1000;
  gzip_types text/css text/javascript application/x-javascript;

  access_log /data/access.log;
  error_log  /data/error.log info;

  location /api {
    try_files $uri @proxy;
    access_log off;
    expires max;
  }

  location /auth {
    try_files $uri @proxy;
    access_log off;
    expires max;
  }

  location @proxy {
    proxy_set_header Host $http_host;
    proxy_set_header X-Forwarded-Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_pass       http://127.0.0.1:<%= @dancer_port %>;
  }

  location / {
    proxy_set_header X-Forwarded-Host localhost;
    if ($args ~ "^_escaped_fragment_=$") {
        proxy_pass       http://127.0.0.1:4000;
    }<commit_msg>expires 0 in nginx conf instead of a weird expired max<commit_after>server {
  listen       <%= @port %>;

  <% if @dev %>
  server_name localhost;
  <% else %>
  server_name questhub.io;
  <% end %>

  <% if @dev %>
  # Turn sendfile off because it behaves bad with vboxsf
  sendfile off;
  <% end %>

  gzip             on;
  gzip_min_length  1000;
  gzip_types text/css text/javascript application/x-javascript;

  access_log /data/access.log;
  error_log  /data/error.log info;

  location /api {
    try_files $uri @proxy;
    access_log off;
    expires 0;
  }

  location /auth {
    try_files $uri @proxy;
    access_log off;
    expires 0;
  }

  location @proxy {
    proxy_set_header Host $http_host;
    proxy_set_header X-Forwarded-Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_pass       http://127.0.0.1:<%= @dancer_port %>;
  }

  location / {
    proxy_set_header X-Forwarded-Host localhost;
    if ($args ~ "^_escaped_fragment_=$") {
        proxy_pass       http://127.0.0.1:4000;
    }
{'fraction_non_alphanumeric': 0.11561771561771562, 'fraction_numerical': 0.020046620046620046, 'mean_word_length': 2.668376068376068, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, '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': '1459456', 'n_tokens_mistral': 842, 'n_tokens_neox': 761, 'n_words': 174}