-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnginx.staging
46 lines (37 loc) · 1.25 KB
/
nginx.staging
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
limit_req_zone $binary_remote_addr zone=two:10m rate=10r/s;
server {
listen 443 ssl;
server_name nk-preview.konfer.ca;
ssl_certificate /etc/ssl/nk-preview/cert.pem;
ssl_certificate_key /etc/ssl/nk-preview/key.pem;
root /home/spur/staging/frontend;
index index.html
gzip on;
gzip_vary on;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain text/css text/xml text/javascript application/javascript
application/x-javascript application/xml;
gzip_disable "MSIE [1-6]\.";
# frontend
location / {
try_files $uri $uri/ /index.html;
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";
}
# backend
location /api/v1 {
limit_req zone=two burst=20 nodelay;
limit_req_status 444;
proxy_pass http://127.0.0.1:6969;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-App-Name nk-staging;
}
# deny access to hidden files
location ~ /\. {
deny all;
}
}