server {
    listen       80;
    server_name localhost;
	client_max_body_size 1000m;
	gzip_static on;
    gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
    gzip_proxied  any;
    gzip_vary on;
    gzip_comp_level 6;
    gzip_buffers 16 8k;
    gzip_http_version 1.1;
	add_header Access-Control-Allow-Origin *;
	add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS';
	add_header Access-Control-Allow-Headers 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization';
	if ($request_method = 'OPTIONS') {
		return 204;
	}
    location / {
        root   /usr/share/nginx/html;
        try_files $uri $uri/ /index.html;
    }
	location /api/v2 {
		proxy_pass   http://pas-api:8879;
	    proxy_set_header Upgrade $http_upgrade;
	    proxy_set_header Connection "upgrade";
		proxy_connect_timeout 86400s;
		proxy_read_timeout 86400s;
		proxy_send_timeout 86400s;
	}
    location /pdfjs {
		proxy_pass   http://pas-api:8879;
	}
    location /file {
		proxy_pass   http://pas-api:8879;
	}
}