~gitpocket/gitpocket

3
ddd4238b49f3d3ec5dde978b5e097024677e99ee
mainfeed-discovery
gitpocket/deploy/nginx.conf -rw-r--r--1.3 KiB ViewLogBlameView rawPermalink 05701a4801 feat(repos): branch switcher and push notices 13 days ago
 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
limit_req_zone $binary_remote_addr zone=gitpocket:10m rate=10r/s;

server {
    listen 80;
    listen [::]:80;
    server_name git.example.org;
    location / { return 301 https://$host$request_uri; }
}

server {
    listen 443 ssl;
    listen [::]:443 ssl;
    http2 on;
    server_name git.example.org;
    ssl_certificate /etc/letsencrypt/live/gitpocket/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/gitpocket/privkey.pem;
    ssl_protocols TLSv1.2 TLSv1.3;
    client_max_body_size 512m;
    add_header Strict-Transport-Security "max-age=31536000" always;
    gzip on;
    gzip_proxied any;
    gzip_vary on;
    gzip_comp_level 5;
    gzip_types text/css text/plain application/javascript image/svg+xml application/atom+xml application/json;
    location / {
        limit_req zone=gitpocket burst=60 nodelay;
        limit_req_status 429;
        proxy_pass http://127.0.0.1:3200;
        proxy_http_version 1.1;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-Proto https;
        proxy_set_header X-Forwarded-For $remote_addr;
        proxy_request_buffering off;
        proxy_buffering off;
        proxy_read_timeout 600s;
    }
    location /static/ {
        proxy_pass http://127.0.0.1:3200;
        proxy_set_header Host $host;
    }
}