-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
asreview.conf
50 lines (39 loc) · 1.43 KB
/
asreview.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
events {
worker_connections 1024;
}
http {
client_max_body_size 100M;
proxy_cache_path /var/cache/nginx/asreview keys_zone=asreview:20m max_size=500m;
upstream asreview_container {
server asreview:5006;
}
server {
listen 80;
gzip on;
gzip_http_version 1.0;
gzip_comp_level 2;
gzip_proxied any;
gzip_types application/javascript; # our css file is small and cached by browser
proxy_set_header Host $http_host; # $http_host (unlike $host) preserves port numbers
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_cache_key $scheme://$host$uri$is_args$query_string;
location / {
proxy_pass http://asreview_container;
}
location = /favicon.ico {
proxy_pass http://asreview_container;
proxy_cache asreview;
proxy_cache_valid 200 100d;
proxy_ignore_headers Cache-Control;
add_header X-Proxy-Cache $upstream_cache_status;
}
location ^~ /static {
proxy_pass http://asreview_container;
proxy_cache asreview;
proxy_cache_valid 200 100d;
proxy_ignore_headers Cache-Control;
add_header X-Proxy-Cache $upstream_cache_status;
}
}
}