-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproxy.template
51 lines (44 loc) · 1.3 KB
/
proxy.template
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
51
server {
listen 80;
server_name localhost;
client_max_body_size 2000M;
server_tokens off;
root /usr/share/nginx/html/;
${NGINX_RESOLVER}
# Enable gzip
gzip on;
gzip_comp_level 2;
gzip_proxied any;
gzip_vary on;
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/javascript application/xml;
set $vsurl "${VIDISPINE_URL}";
location ~ ^/(API|APInoauth|APIinit|APIdoc)/.* {
proxy_pass $vsurl;
proxy_hide_header WWW-Authenticate;
proxy_request_buffering off;
proxy_http_version 1.1;
client_max_body_size 0;
}
location ~ ^/.*\.(json|ico)$ {
add_header "Cache-Control" "public";
expires 30d;
add_header "Pragma" "cache";
}
location ~ ^(/[^/]+)?/static/ {
add_header "Cache-Control" "public";
expires 30d;
add_header "Pragma" "cache";
}
location ~ ^(/[^/]+)?/assets/ {
add_header "Cache-Control" "public";
expires 30d;
add_header "Pragma" "cache";
}
location / {
# Never cache index.html
try_files /index.html =404;
expires -1;
add_header "Cache-Control" "no-cache, no-store, must-revalidate";
add_header "Pragma" "no-cache";
}
}