aboutsummaryrefslogtreecommitdiff
path: root/website/nginx-monzero.conf
blob: 4e69577c401ce6c614be98470261910ee7816909 (plain)
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
server {
    listen 80;
    listen [::]:80;
    server_name monzero.org www.monzero.org;

    root /var/www/monzero;
    index index.html;

    location / {
        try_files $uri $uri/ =404;
    }

    # Same-origin, read-only node status endpoint used by the homepage.
    location = /api/node-info {
        limit_except POST { deny all; }
        proxy_pass http://127.0.0.1:6175/get_info;
        proxy_set_header Content-Type application/json;
        proxy_pass_request_headers on;
        proxy_connect_timeout 2s;
        proxy_read_timeout 5s;
        add_header Cache-Control "no-store" always;
    }

    location ~* \.(?:css|js|png|ico|svg|tar\.gz|sha256)$ {
        expires 7d;
        add_header Cache-Control "public, max-age=604800";
        try_files $uri =404;
    }

    add_header X-Content-Type-Options nosniff always;
    add_header Referrer-Policy strict-origin-when-cross-origin always;
    add_header X-Frame-Options DENY always;
}