-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-nginx.conf
43 lines (35 loc) · 1.11 KB
/
docker-nginx.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
server {
listen 3000;
server_name localhost;
# TODO: discriminate between MAX_RESOURCE_SIZE & MAX_STORY_SIZE
client_max_body_size ${MAX_STORY_SIZE};
server_tokens off;
add_header X-Frame-Options SAMEORIGIN;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header Strict-Transport-Security "max-age=31536000;";
add_header X-Robots-Tag "noindex, nofollow";
resolver ${NS} ipv6=off;
set $api "http://${QUINOA_HOST}:${QUINOA_PORT}";
### API
location /quinoa/ {
rewrite ^/quinoa(/.*)$ $1 break;
proxy_pass $api;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
### Static HTML5/JS
location / {
root /fonio/;
index index.html index.htm;
try_files $uri $uri/ /index.html?$query_string;
}
location ^~ /quinoa/static {
alias /fonio/stories-data/stories;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}