blob: e6fa55b8d51c1e82f9529335d0b73fd55ef9219d (
plain) (
blame)
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
|
$(for user in ${syncthing_users:-}; do cat <<EOF
upstream syncthing_${user} {
server unix:///var/run/syncthing/${user}/syncthing.sock;
}
EOF
done)
server {
listen 443 ssl default_server;
listen [::]:443 ssl default_server;
http2 on;
ssl_certificate ${syncthing_https_cert};
ssl_certificate_key ${syncthing_https_key};
add_header Strict-Transport-Security "max-age=63072000" always;
auth_gss_keytab ${nginx_keytab};
auth_gss_allow_basic_fallback off;
$(for user in ${syncthing_users:-}; do cat <<EOF
location /${user}/ {
proxy_http_version 1.1;
proxy_set_header Connection "";
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_read_timeout 600s;
proxy_send_timeout 600s;
proxy_pass http://syncthing_${user}/;
auth_gss on;
auth_gss_authorized_principal ${user};
}
EOF
done)
}
|