-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathnginx.conf
More file actions
32 lines (27 loc) · 859 Bytes
/
Copy pathnginx.conf
File metadata and controls
32 lines (27 loc) · 859 Bytes
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
server {
listen 8080;
server_name localhost;
root /usr/share/nginx/html;
index index.html;
# Allow long URLs for shared state
client_header_buffer_size 64k;
large_client_header_buffers 4 64k;
# Gzip compression
gzip on;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
location / {
try_files $uri $uri/ /index.html;
}
# Proxy API requests to Google
location /api/giq/ {
rewrite ^/api/giq/(.*) /$1 break;
proxy_pass https://gkerecommender.googleapis.com;
proxy_ssl_server_name on;
proxy_set_header Host gkerecommender.googleapis.com;
}
# Cache static assets
location /assets/ {
expires 1y;
add_header Cache-Control "public, no-transform";
}
}