server {
    include listen;

    add_header Access-Control-Allow-Origin "$http_origin";

    proxy_headers_hash_max_size 1024;
    proxy_headers_hash_bucket_size 128;

    # Взял список из /etc/nginx/nginx.conf и дополнил его application/manifest+json
    gzip_types text/plain text/css application/javascript application/x-javascript text/xml application/xml application/xml+rss text/javascript application/json application/x-protobuf application/manifest+json;

    location / {
        include proxy_params;
        proxy_intercept_errors on;

        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;

        proxy_pass http://unix:/var/run/flight-status-fetcher.sock:;
        proxy_next_upstream error;
    }

    location /test {
        return 200 'OK!';
        add_header Content-Type: text/plain;
    }

    location /version {
        proxy_intercept_errors on;
        proxy_pass http://unix:/var/run/flight-status-fetcher.sock:;
        include proxy_params;
        proxy_next_upstream error;
    }
}
