<commit_before># MANAGED BY PUPPET
# Module:: nginxpack::vhost::proxy
# File:: nginxpack/templates/nginx/vhost_proxy.erb

server {
  <% if (!@ipv6 || @ipv6.empty?) && (!@ipv4 || @ipv4.empty?) then %>
    listen [::]:<%= @portval %>;
    listen 0.0.0.0:<%= @portval %>;
  <% else -%>
    <% if @ipv6 && !@ipv6.empty? then -%>
      listen [<%= @ipv6 %>]:<%= @portval %>;
    <% end -%>
    <% if @ipv4 && !@ipv4.empty? then -%>
      listen <%= @ipv4 %>:<%= @portval %>;
    <% end -%>
  <% end -%>

  server_name <%= @domains.join(' ') %>;
  server_tokens off;

  access_log /var/log/nginx/<%= @name %>_proxy/access.log;
  error_log /var/log/nginx/<%= @name %>_proxy/errors.log;

  client_max_body_size <%= @upload_max_size %>;

  <% if @https then -%>
  ssl on;
  ssl_session_timeout 5m;
  ssl_protocols SSLv3 TLSv1;
  ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;
  ssl_prefer_server_ciphers on;
  ssl_certificate /etc/nginx/ssl/<%= @name %>_proxy.pem;
  ssl_certificate_key /etc/nginx/ssl/<%= @name %>_proxy.key;
  <% end -%>

  <% if @add_config_source || @add_config_content then -%>
  include /etc/nginx/include/<%= @name %>_proxy.conf;
  <% end -%>

  location / {
    proxy_pass http<%= @to_https ? 's' : '' %>://<%= @to_domainval %>:<%= @to_portval %>/;
    proxy_redirect          off;
    # proxy_set_header        Host            $host;
    proxy_set_header        X-Real-IP       $remote_addr;
    proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_connect_timeout   90;
    proxy_send_timeout      90;
    proxy_read_timeout      90;
    proxy_buffers           32 4k;
    client_body_buffer_size 128k;
  }
}<commit_msg>[vhost::proxy] Fix template configuration (proxyfy)<commit_after># MANAGED BY PUPPET
# Module:: nginxpack::vhost::proxy
# File:: nginxpack/templates/nginx/vhost_proxy.erb

server {
  <% if (!@ipv6 || @ipv6.empty?) && (!@ipv4 || @ipv4.empty?) then %>
    listen [::]:<%= @portval %>;
    listen 0.0.0.0:<%= @portval %>;
  <% else -%>
    <% if @ipv6 && !@ipv6.empty? then -%>
      listen [<%= @ipv6 %>]:<%= @portval %>;
    <% end -%>
    <% if @ipv4 && !@ipv4.empty? then -%>
      listen <%= @ipv4 %>:<%= @portval %>;
    <% end -%>
  <% end -%>

  server_name <%= @domains.join(' ') %>;
  server_tokens off;

  access_log /var/log/nginx/<%= @name %>_proxy/access.log;
  error_log /var/log/nginx/<%= @name %>_proxy/errors.log;

  client_max_body_size <%= @upload_max_size %>;

  <% if @https then -%>
  ssl on;
  ssl_session_timeout 5m;
  ssl_protocols SSLv3 TLSv1;
  ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;
  ssl_prefer_server_ciphers on;
  ssl_certificate /etc/nginx/ssl/<%= @name %>_proxy.pem;
  ssl_certificate_key /etc/nginx/ssl/<%= @name %>_proxy.key;
  <% end -%>

  <% if @add_config_source || @add_config_content then -%>
  include /etc/nginx/include/<%= @name %>_proxy.conf;
  <% end -%>

  location / {
    proxy_pass http<%= @to_https ? 's' : '' %>://<%= @to_domainval %>:<%= @to_portval %>/;
    proxy_set_header        Host            $host;
    proxy_set_header        X-Real-IP       $remote_addr;
    proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_connect_timeout   90;
    proxy_send_timeout      90;
    proxy_read_timeout      90;
    proxy_buffers           32 4k;
    client_body_buffer_size 128k;
  }
}
{'fraction_non_alphanumeric': 0.1902222222222222, 'fraction_numerical': 0.019555555555555555, 'mean_word_length': 3.062575210589651, 'pattern_counts': {'":': 0, '<': 57, '<?xml version=': 0, '>': 57, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '2863748', 'n_tokens_mistral': 1482, 'n_tokens_neox': 1358, 'n_words': 228}