-
Notifications
You must be signed in to change notification settings - Fork 0
/
rubberband-oauth
58 lines (49 loc) · 1.71 KB
/
rubberband-oauth
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
47
48
49
50
51
52
53
54
55
56
57
# an example nginx configuration for rubberband with oauth2_proxy for frontend authentication
upstream rubberband-auth {
server 127.0.0.1:4180;
}
upstream rubberband-api {
server 127.0.0.1:8888;
}
server {
listen 80;
return 301 https://$host$request_uri;
}
server {
listen 443;
server_name rubberband.example.de;
# out files are large
client_body_in_file_only clean;
client_body_buffer_size 32K;
client_max_body_size 400M;
sendfile on;
send_timeout 300s;
tcp_nodelay on;
tcp_nopush on;
ssl on;
ssl_certificate /etc/letsencrypt/live/rubberband.example.de/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/rubberband.example.de/privkey.pem;
add_header Strict-Transport-Security max-age=2592000;
access_log /var/log/nginx/rubberband-access.log;
error_log /var/log/nginx/rubberband-error.log;
location ^~ /api {
proxy_pass http://rubberband-api;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_connect_timeout 60;
proxy_send_timeout 600;
proxy_read_timeout 600;
}
location / {
proxy_pass http://rubberband-auth;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_connect_timeout 60;
proxy_send_timeout 600;
proxy_read_timeout 600;
}
}