upstream pittapi {
  server unix:///u/apps/pittapi/sockets/gunicorn.sock fail_timeout=0;
}

server {
  listen 80;
  server_name pittapi.pittcsc.org;

  location / {
    proxy_pass http://pittapi;
    proxy_redirect off;

    gzip on;
    add_header "Cache-Control" "max-age=5259490";

    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  }

  keepalive_timeout 10;
}

upstream pittapi {
  server unix:///u/apps/pittapi/sockets/gunicorn.sock fail_timeout=0;
}

server {
  listen 80;
  server_name pittapi.pittcsc.org;

  location / {
    proxy_pass http://pittapi;
    proxy_redirect off;

    gzip on;
    gzip_types application/json;
    add_header "Cache-Control" "max-age=5259490";

    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  }

  keepalive_timeout 10;
}

Apply gzip compression to JSON responses
Apply gzip compression to JSON responses
