Skip to content

Commit

Permalink
enable compression
Browse files Browse the repository at this point in the history
  • Loading branch information
simlarsen committed Oct 31, 2023
1 parent 2e27347 commit ccb4781
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Nginx/default.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ upstream otel-collector {

server {

gzip on;
gzip_types text/plain application/xml text/html application/javascript text/javascript text/css application/json;
gzip_proxied no-cache no-store private expired auth;
gzip_min_length 1000;

listen 80 default_server;

server_name _; # All domains.
Expand All @@ -73,6 +78,7 @@ server {
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;


location / {
return 301 https://$host$request_uri;
}
Expand Down Expand Up @@ -142,6 +148,11 @@ server {

server {

gzip on;
gzip_types text/plain application/xml text/html application/javascript text/javascript text/css application/json;
gzip_proxied no-cache no-store private expired auth;
gzip_min_length 1000;

listen 443 default_server ssl; # Port HTTPS


Expand Down Expand Up @@ -232,6 +243,11 @@ server {
}

server {

gzip on;
gzip_types text/plain application/xml text/html application/javascript text/javascript text/css application/json;
gzip_proxied no-cache no-store private expired auth;
gzip_min_length 1000;

listen 80;

Expand Down Expand Up @@ -403,6 +419,7 @@ server {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";

proxy_pass http://status-page;
}

Expand Down

0 comments on commit ccb4781

Please sign in to comment.